@@ -2582,7 +2582,10 @@ def test_input_formats(fake_dists, runner, make_module, fname, content):
2582
2582
assert "extra ==" not in out .stderr
2583
2583
2584
2584
2585
- def test_error_in_pyproject_toml (fake_dists , runner , make_module , capfd ):
2585
+ @pytest .mark .parametrize ("verbose_option" , (True , False ))
2586
+ def test_error_in_pyproject_toml (
2587
+ fake_dists , runner , make_module , capfd , verbose_option
2588
+ ):
2586
2589
"""
2587
2590
Test that an error in pyproject.toml is reported.
2588
2591
"""
@@ -2594,17 +2597,23 @@ def test_error_in_pyproject_toml(fake_dists, runner, make_module, capfd):
2594
2597
"""
2595
2598
)
2596
2599
meta_path = make_module (fname = fname , content = invalid_content )
2597
- out = runner . invoke (
2598
- cli , [ "-n" , "--no-build-isolation" , "--find-links" , fake_dists , meta_path ]
2599
- )
2600
- assert out . exit_code == 2 , out . stderr
2601
- assert "`project` must contain ['name'] properties" not in capfd . readouterr (). err
2602
- out = runner . invoke (
2603
- cli , ["-n" , "--no-build-isolation" , "-v " , "--find-links" , fake_dists , meta_path ]
2600
+
2601
+ options = [ ]
2602
+ if verbose_option :
2603
+ options = [ "--verbose" ]
2604
+
2605
+ options . extend (
2606
+ ["-n" , "--no-build-isolation" , "--find-links" , fake_dists , meta_path ]
2604
2607
)
2608
+
2609
+ out = runner .invoke (cli , options )
2610
+
2605
2611
assert out .exit_code == 2 , out .stderr
2606
2612
captured = capfd .readouterr ()
2607
- assert "`project` must contain ['name'] properties" in captured .err
2613
+
2614
+ assert (
2615
+ "`project` must contain ['name'] properties" in captured .err
2616
+ ) is verbose_option
2608
2617
2609
2618
2610
2619
@pytest .mark .network
0 commit comments