From da2c2e8492c85b315d3cc0892a69ff2fc9c259e8 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 24 May 2018 09:58:36 +0200 Subject: [PATCH] more debugging for #3498 --- testing/test_unittest.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/testing/test_unittest.py b/testing/test_unittest.py index 685ca1b7a..202b20c19 100644 --- a/testing/test_unittest.py +++ b/testing/test_unittest.py @@ -850,6 +850,20 @@ def test_usefixtures_marker_on_unittest(base, testdir): @pytest.fixture(scope='function') def fixture2(request, monkeypatch): monkeypatch.setattr(request.instance, 'fixture2', True ) + + def node_and_marks(item): + print(item.nodeid) + for mark in item.iter_markers(): + print(" ", mark) + + @pytest.fixture(autouse=True) + def my_marks(request): + node_and_marks(request.node) + + def pytest_collection_modifyitems(items): + for item in items: + node_and_marks(item) + """) testdir.makepyfile(""" @@ -873,5 +887,5 @@ def test_usefixtures_marker_on_unittest(base, testdir): """.format(module=module, base=base)) - result = testdir.runpytest() + result = testdir.runpytest('-s') result.assert_outcomes(passed=2)