MCPcopy
hub / github.com/pytest-dev/pytest / test_config_error

Method test_config_error

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

Source from the content-addressed store, hash-verified

27
28class TestGeneralUsage:
29 def test_config_error(self, pytester: Pytester) -> None:
30 pytester.copy_example("conftest_usageerror/conftest.py")
31 result = pytester.runpytest(pytester.path)
32 assert result.ret == ExitCode.USAGE_ERROR
33 result.stderr.fnmatch_lines(["*ERROR: hello"])
34 result.stdout.fnmatch_lines(["*pytest_unconfigure_called"])
35
36 def test_root_conftest_syntax_error(self, pytester: Pytester) -> None:
37 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