# Path: tbmodels/_cli.py
# @click.group()
# @click.version_option(version=tbmodels_version)
# def cli():
#     pass


import tempfile
import pytest
import tbmodels
from click.testing import CliRunner
from tbmodels._cli import cli
                sample(""),
                "-p",
                prefix,
                "--pos-kind",
                pos_kind,
            ]
            + cli_sparsity_arguments
            + cli_verbosity_argument
            + distance_ratio_arguments,
            catch_exceptions=False,
        )
        print(run.output)
        model_res = tbmodels.Model.from_hdf5_file(out_file.name)
    model_reference = tbmodels.Model.from_wannier_folder(
        folder=sample(""), prefix=prefix, pos_kind=pos_kind, **distance_ratio_kwargs
    )
    modify_reference_model_sparsity(model_reference)
    models_equal(model_res, model_reference)


@pytest.mark.parametrize("prefix", ["silicon", "bi"])
def test_ambiguous_nearest_atom(prefix, sample):
    """
    Test that the 'parse' command with `pos_kind='nearest_atom' results
    in the expected error for cases where the nearest atom position is
    ambiguous.
    """
    runner = CliRunner(mix_stderr=False)
    with tempfile.NamedTemporaryFile() as out_file:
        run = runner.invoke(

# Path: tbmodels/_cli.py
# @click.group()
# @click.version_option(version=tbmodels_version)
# def cli():
#     pass


# Path: tests/test_cli_parse.py
import tempfile
import pytest
import tbmodels
from click.testing import CliRunner
from tbmodels._cli import cli

                sample(""),
                "-p",
                prefix,
                "--pos-kind",
                pos_kind,
            ]
            + cli_sparsity_arguments
            + cli_verbosity_argument
            + distance_ratio_arguments,
            catch_exceptions=False,
        )
        print(run.output)
        model_res = tbmodels.Model.from_hdf5_file(out_file.name)
    model_reference = tbmodels.Model.from_wannier_folder(
        folder=sample(""), prefix=prefix, pos_kind=pos_kind, **distance_ratio_kwargs
    )
    modify_reference_model_sparsity(model_reference)
    models_equal(model_res, model_reference)


@pytest.mark.parametrize("prefix", ["silicon", "bi"])
def test_ambiguous_nearest_atom(prefix, sample):
    """
    Test that the 'parse' command with `pos_kind='nearest_atom' results
    in the expected error for cases where the nearest atom position is
    ambiguous.
    """
    runner = CliRunner(mix_stderr=False)
    with tempfile.NamedTemporaryFile() as out_file:
        run = runner.invoke(

            cli,