Skip to content

Commit 9e1d888

Browse files
LouisTsai-Csiespencer-tb
authored andcommitted
refactor: update filter logic
1 parent 2a6f9ee commit 9e1d888

File tree

1 file changed

+5
-2
lines changed
  • packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared

1 file changed

+5
-2
lines changed

packages/testing/src/execution_testing/cli/pytest_commands/plugins/shared/benchmarking.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ def pytest_configure(config: pytest.Config) -> None:
4444
def pytest_collection_modifyitems(
4545
config: pytest.Config, items: list[pytest.Item]
4646
) -> None:
47-
"""Filter tests based on repricing marker"""
47+
"""
48+
Filter tests based on repricing marker when both -m repricing and
49+
benchmark flags are specified.
50+
"""
4851
gas_benchmark_value = config.getoption("gas_benchmark_value")
4952
fixed_opcode_count = config.getoption("fixed_opcode_count")
5053

@@ -53,7 +56,7 @@ def pytest_collection_modifyitems(
5356

5457
# Check if -m repricing marker filter was specified
5558
markexpr = config.getoption("markexpr", "")
56-
if "repricing" not in markexpr or "not repricing" in markexpr:
59+
if "repricing" not in markexpr:
5760
return
5861

5962
filtered = []

0 commit comments

Comments
 (0)