setuponly: remove printing out/err from capman#6009
setuponly: remove printing out/err from capman#6009nicoddemus merged 2 commits intopytest-dev:masterfrom
Conversation
|
LGTM. diff --git i/testing/python/setup_only.py w/testing/python/setup_only.py
index 8e4e3ace8..ef165c153 100644
--- i/testing/python/setup_only.py
+++ w/testing/python/setup_only.py
@@ -276,7 +276,7 @@ def test_setup_show_with_KeyboardInterrupt_in_test(testdir):
import pytest
@pytest.fixture
def arg():
- assert True
+ pass
def test_arg(arg):
raise KeyboardInterrupt()
"""
@@ -303,7 +303,7 @@ def test_setup_show_with_KeyboardInterrupt_in_fixture(testdir):
def arg():
raise KeyboardInterrupt()
def test_arg(arg):
- assert True
+ pass
"""
)
result = testdir.runpytest("--setup-show", p, no_reraise_ctrlc=True)
@@ -311,3 +311,4 @@ def test_arg(arg):
result.stdout.fnmatch_lines(
["*SETUP F arg*", "*! KeyboardInterrupt !*", "*= no tests ran in *"]
)
+ assert "TEARDOWN F arg" not in str(result.stdout)Also please squash and force-push it then. |
|
(I'm not really sure we need two tests here, which adds overhead to the test suite, but I guess it is OK). |
|
Note: |
|
@nicoddemus |
Follow-up to pytest-dev#6009.
|
@blueyed I think the fixture test does not add much overhead and can left to provide some guard refactoring of the setup_only internals. |
|
@yoavcaspi |
|
great :-) |
Follow-up to pytest-dev#6009.

resolve #5906
Thanks for @blueyed @asottile for the great help.
Really appreciate it.