MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_pytest_configure_warning

Function test_pytest_configure_warning

testing/test_warnings.py:638–653  ·  view source on GitHub ↗

Issue 5115.

(pytester: Pytester, recwarn)

Source from the content-addressed store, hash-verified

636
637
638def test_pytest_configure_warning(pytester: Pytester, recwarn) -> None:
639 """Issue 5115."""
640 pytester.makeconftest(
641 """
642 def pytest_configure():
643 import warnings
644
645 warnings.warn("from pytest_configure")
646 """
647 )
648
649 result = pytester.runpytest()
650 assert result.ret == 5
651 assert "INTERNALERROR" not in result.stderr.str()
652 warning = recwarn.pop()
653 assert str(warning.message) == "from pytest_configure"
654
655
656class TestStackLevel:

Callers

nothing calls this directly

Calls 4

strMethod · 0.80
popMethod · 0.80
makeconftestMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected