Skip to content

Commit 046cb38

Browse files
committed
Produce INFO summary only if -v is present and --iterations is not present (to avoid a distracting flood of output).
1 parent f9b4930 commit 046cb38

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cuda_pathfinder/tests/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ 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+
1216
def pytest_terminal_summary(terminalreporter, exitstatus, config): # noqa: ARG001
17+
if not config.getoption("verbose"):
18+
return
19+
if _cli_has_flag(config.invocation_params.args, "--iterations"):
20+
return
21+
1322
if config.custom_info:
1423
terminalreporter.write_sep("=", "INFO summary")
1524
for msg in config.custom_info:

0 commit comments

Comments
 (0)