Skip to content

Commit 2e7dcef

Browse files
committed
Merge branch 'forks/amsterdam' into projects/zkevm
2 parents 73fc577 + 83d978e commit 2e7dcef

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

  • packages/testing/src/execution_testing/cli/pytest_commands

packages/testing/src/execution_testing/cli/pytest_commands/base.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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

3944
class 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

packages/testing/src/execution_testing/cli/pytest_commands/fill.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Any, List
44

55
import click
6+
import pytest
67

78
from .base import PytestCommand, PytestExecution, common_pytest_options
89
from .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,

0 commit comments

Comments
 (0)