File tree Expand file tree Collapse file tree
packages/testing/src/execution_testing/cli/pytest_commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ class PytestExecution:
3535 description : Optional [str ] = None
3636 """Optional description for this execution phase."""
3737
38+ allowed_exit_codes : List [pytest .ExitCode ] = field (
39+ default_factory = lambda : [pytest .ExitCode .OK ]
40+ )
41+ """Exit codes treated as successful for this execution."""
42+
3843
3944class ArgumentProcessor (ABC ):
4045 """Base class for processing command-line arguments."""
@@ -99,7 +104,7 @@ def run_multiple(self, executions: List[PytestExecution]) -> int:
99104 sys .stderr .flush ()
100105
101106 result = self .run_single (execution )
102- if result != 0 :
107+ if result not in execution . allowed_exit_codes :
103108 return result
104109
105110 return 0
Original file line number Diff line number Diff line change 33from typing import Any , List
44
55import click
6+ import pytest
67
78from .base import PytestCommand , PytestExecution , common_pytest_options
89from .processors import (
@@ -80,6 +81,10 @@ def _create_two_phase_executions(
8081 config_file = self .config_path ,
8182 args = phase1_args ,
8283 description = "generating pre-allocation groups" ,
84+ allowed_exit_codes = [
85+ pytest .ExitCode .OK ,
86+ pytest .ExitCode .NO_TESTS_COLLECTED ,
87+ ],
8388 ),
8489 PytestExecution (
8590 config_file = self .config_path ,
You can’t perform that action at this time.
0 commit comments