Skip to content

Commit 960b416

Browse files
committed
Add tests
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 9fbf013 commit 960b416

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

src/python_inspector/resolve_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def resolve_dependencies(
135135
operating_system,
136136
index_urls,
137137
json_output,
138-
max_rounds=100,
138+
max_rounds,
139139
use_cached_index=False,
140140
use_pypi_json_api=False,
141141
debug=TRACE,

tests/test_cli.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,26 @@ def test_cli_with_multiple_index_url_and_tilde_req():
7474
)
7575

7676

77+
@pytest.mark.online
78+
def test_cli_with_multiple_index_url_and_tilde_req_with_max_rounds():
79+
expected_file = test_env.get_test_loc("tilde_req-expected.json", must_exist=False)
80+
specifier = "zipp~=3.8.0"
81+
extra_options = [
82+
"--index-url",
83+
"https://pypi.org/simple",
84+
"--index-url",
85+
"https://thirdparty.aboutcode.org/pypi/simple/",
86+
"--max-rounds",
87+
"100",
88+
]
89+
check_specs_resolution(
90+
specifier=specifier,
91+
expected_file=expected_file,
92+
extra_options=extra_options,
93+
regen=REGEN_TEST_FIXTURES,
94+
)
95+
96+
7797
@pytest.mark.online
7898
def test_cli_with_multiple_index_url_and_tilde_req_and_netrc_file_without_matching_url():
7999
expected_file = test_env.get_test_loc("tilde_req-expected.json", must_exist=False)

0 commit comments

Comments
 (0)