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

Method test_config_error

testing/acceptance_test.py:22–27  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

20
21class TestGeneralUsage:
22 def test_config_error(self, pytester: Pytester) -> None:
23 pytester.copy_example("conftest_usageerror/conftest.py")
24 result = pytester.runpytest(pytester.path)
25 assert result.ret == ExitCode.USAGE_ERROR
26 result.stderr.fnmatch_lines(["*ERROR: hello"])
27 result.stdout.fnmatch_lines(["*pytest_unconfigure_called"])
28
29 def test_root_conftest_syntax_error(self, pytester: Pytester) -> None:
30 pytester.makepyfile(conftest="raise SyntaxError\n")

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
copy_exampleMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected