Skip to content

Commit dbde2b4

Browse files
authored
Produce INFO summary only if pytest -v option is present and --iterations is not present (#1037)
* Produce INFO summary only if `-v` is present and `--iterations` is not present (to avoid a distracting flood of output). * Even simpler implementation, also handle `pytest-repeat` `--count` while we're at it.
1 parent 62d6963 commit dbde2b4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cuda_pathfinder/tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ def pytest_configure(config):
1010

1111

1212
def pytest_terminal_summary(terminalreporter, exitstatus, config): # noqa: ARG001
13+
if not config.getoption("verbose"):
14+
return
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
18+
return
19+
1320
if config.custom_info:
1421
terminalreporter.write_sep("=", "INFO summary")
1522
for msg in config.custom_info:

0 commit comments

Comments
 (0)