@@ -23,10 +23,7 @@ def get_output(args: list[str]) -> str:
2323
2424
2525warns_cli_root_override = pytest .warns (
26- UserWarning , match = "root .. is overridden by the cli arg ."
27- )
28- warns_absolute_root_override = pytest .warns (
29- UserWarning , match = "absolute root path '.*' overrides relative_to '.*'"
26+ UserWarning , match = "root .. is overridden by the cli arg .*"
3027)
3128
3229exits_with_not_found = pytest .raises (SystemExit , match = "no version found for" )
@@ -35,11 +32,9 @@ def get_output(args: list[str]) -> str:
3532def test_cli_find_pyproject (
3633 wd : WorkDir , monkeypatch : pytest .MonkeyPatch , debug_mode : DebugMode
3734) -> None :
38- debug_mode .disable ()
3935 wd .commit_testfile ()
4036 wd .write (PYPROJECT_TOML , PYPROJECT_SIMPLE )
4137 monkeypatch .chdir (wd .cwd )
42-
4338 out = get_output ([])
4439 assert out .startswith ("0.1.dev1+" )
4540
@@ -50,7 +45,7 @@ def test_cli_find_pyproject(
5045 with exits_with_not_found :
5146 print (get_output (["-c" , PYPROJECT_TOML ]))
5247
53- with exits_with_not_found , warns_absolute_root_override :
48+ with warns_cli_root_override , exits_with_not_found :
5449 get_output (["-c" , PYPROJECT_TOML , "--root=.." ])
5550
5651 with warns_cli_root_override :
0 commit comments