@@ -136,7 +136,7 @@ def test_group_options_are_passed_to_the_installer(
136
136
137
137
status_code = tester .execute (options )
138
138
139
- if options == "--no-root --only-root" :
139
+ if options == "--no-root --only-root" or with_root :
140
140
assert status_code == 1
141
141
return
142
142
else :
@@ -322,7 +322,7 @@ def test_invalid_groups_with_without_only(
322
322
323
323
if not should_raise :
324
324
tester .execute (cmd_args )
325
- assert tester .status_code == 0
325
+ assert tester .status_code == 1
326
326
else :
327
327
with pytest .raises (GroupNotFound , match = r"^Group\(s\) not found:" ) as e :
328
328
tester .execute (cmd_args )
@@ -345,7 +345,7 @@ def test_remove_untracked_outputs_deprecation_warning(
345
345
346
346
tester .execute ("--remove-untracked" )
347
347
348
- assert tester .status_code == 0
348
+ assert tester .status_code == 1
349
349
assert (
350
350
"The `--remove-untracked` option is deprecated, use the `--sync` option"
351
351
" instead.\n " in tester .io .fetch_error ()
@@ -440,7 +440,11 @@ def test_install_warning_corrupt_root(
440
440
tester = command_tester_factory ("install" , poetry = poetry )
441
441
tester .execute ("" if with_root else "--no-root" )
442
442
443
- assert tester .status_code == 0
443
+ if error and with_root :
444
+ assert tester .status_code == 1
445
+ else :
446
+ assert tester .status_code == 0
447
+
444
448
if with_root and error :
445
449
assert "The current project could not be installed: " in tester .io .fetch_error ()
446
450
else :
0 commit comments