Skip to content

Commit 91cf3b8

Browse files
authored
print reminder based on verbosity level (#104)
1 parent 618d3a8 commit 91cf3b8

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
0.20.0 (UNRELEASED)
2+
-------------------
3+
4+
- cleanup reminders will now only be printed for verbosity
5+
levels equal or greater than 1
6+
7+
18
0.19.0 (2022-05-23)
29
-------------------
310

xprocess/pytest_xprocess.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ def pytest_runtest_makereport(item, call):
6060

6161

6262
def pytest_unconfigure(config):
63-
print(
64-
"pytest-xprocess reminder::Be sure to terminate the started process by running "
65-
"'pytest --xkill' if you have not explicitly done so in your fixture with "
66-
"'xprocess.getinfo(<process_name>).terminate()'."
67-
)
63+
verbosity_level = config.getoption("verbose")
64+
if verbosity_level >= 1:
65+
print(
66+
"pytest-xprocess reminder::Be sure to terminate the started process "
67+
"by running 'pytest --xkill' if you have not explicitly done so in your "
68+
"fixture with 'xprocess.getinfo(<process_name>).terminate()'."
69+
)
6870

6971

7072
def pytest_configure(config):

0 commit comments

Comments
 (0)