Skip to content

Commit 3f7c742

Browse files
committed
Even simpler implementation, also handle pytest-repeat --count while we're at it.
1 parent 046cb38 commit 3f7c742

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cuda_pathfinder/tests/conftest.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ def pytest_configure(config):
99
config.custom_info = []
1010

1111

12-
def _cli_has_flag(args, flag):
13-
return any(arg == flag or arg.startswith(flag + "=") for arg in args)
14-
15-
1612
def pytest_terminal_summary(terminalreporter, exitstatus, config): # noqa: ARG001
1713
if not config.getoption("verbose"):
1814
return
19-
if _cli_has_flag(config.invocation_params.args, "--iterations"):
15+
if hasattr(config.option, "iterations"): # pytest-freethreaded runs all tests at least twice
16+
return
17+
if getattr(config.option, "count", 1) > 1: # pytest-repeat
2018
return
2119

2220
if config.custom_info:

0 commit comments

Comments
 (0)