-
I'm the author of the pytest plugin @pytest.mark.parametrize("args", ["", "42, 'foo'"])
def test_fail_slow_marker_bad_args(pytester, args: str) -> None:
pytester.makepyfile(
test_func=(
"import pytest\n"
"\n"
f"@pytest.mark.fail_slow({args})\n"
"def test_func():\n"
" assert 2 + 2 == 4\n"
)
)
result = pytester.runpytest()
result.assert_outcomes()
result.stdout.no_fnmatch_line("?")
result.stderr.fnmatch_lines(
["ERROR: @pytest.mark.fail_slow() takes exactly one argument"]
) However, the recent release of pluggy 1.4.0 broke my tests, as now calling the mark with the wrong number of arguments — even within a script run via How can I update this test for pluggy 1.4.0? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
What is the INTERNALERROR? That would probably allow us to see the problem. |
Beta Was this translation helpful? Give feedback.
Right, so the cause is hidden at the bottom there:
The
PluggyTeardownRaisedWarning
warning is new in pluggy 1.4. Basically, you must not raise an exception during an "old-style" hookwrapper teardown, because it then prevents all subsequent teardowns from executing. The appropriate fix depends a…