New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setuponly: remove printing out/err from capman #6009
setuponly: remove printing out/err from capman #6009
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.