22from collections .abc import Callable
33from unittest .mock import Mock , patch
44
5- import typer
5+ from typer import testing
66
77from repo_man .cli import cli
88
99
10- def test_list_repos_clean (runner : typer . testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]) -> None :
10+ def test_list_repos_clean (runner : testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]) -> None :
1111 with runner .isolated_filesystem ():
1212 config = get_config ()
1313 result = runner .invoke (cli , ["list" , "-t" , "all" ], obj = config )
@@ -16,7 +16,7 @@ def test_list_repos_clean(runner: typer.testing.CliRunner, get_config: Callable[
1616
1717
1818def test_list_repos_with_matches (
19- runner : typer . testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]
19+ runner : testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]
2020) -> None :
2121 with runner .isolated_filesystem ():
2222 with open ("repo-man.cfg" , "w" ) as config_file :
@@ -42,7 +42,7 @@ def test_list_repos_with_matches(
4242
4343@patch ("repo_man.commands.list_repos.click.echo_via_pager" )
4444def test_list_repos_when_long (
45- mock_echo_via_pager : Mock , runner : typer . testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]
45+ mock_echo_via_pager : Mock , runner : testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]
4646) -> None :
4747 all_repos = """some-repo-1
4848some-repo-2
@@ -90,7 +90,7 @@ def test_list_repos_when_long(
9090
9191
9292def test_list_repos_for_multiple_tags (
93- runner : typer . testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]
93+ runner : testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]
9494) -> None :
9595 with runner .isolated_filesystem ():
9696 with open ("repo-man.cfg" , "w" ) as config_file :
@@ -118,7 +118,7 @@ def test_list_repos_for_multiple_tags(
118118
119119
120120def test_list_repos_when_invalid_type (
121- runner : typer . testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]
121+ runner : testing .CliRunner , get_config : Callable [[], configparser .ConfigParser ]
122122) -> None :
123123 with runner .isolated_filesystem ():
124124 with open ("repo-man.cfg" , "w" ) as config_file :
0 commit comments