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

Function test_conftest_badcase

testing/test_conftest.py:334–342  ·  view source on GitHub ↗

Check conftest.py loading when directory casing is wrong (#5792).

(pytester: Pytester)

Source from the content-addressed store, hash-verified

332 reason="only relevant for case insensitive file systems",
333)
334def test_conftest_badcase(pytester: Pytester) -> None:
335 """Check conftest.py loading when directory casing is wrong (#5792)."""
336 pytester.path.joinpath("JenkinsRoot/test").mkdir(parents=True)
337 source = {"setup.py": "", "test/__init__.py": "", "test/conftest.py": ""}
338 pytester.makepyfile(**{"JenkinsRoot/%s" % k: v for k, v in source.items()})
339
340 os.chdir(pytester.path.joinpath("jenkinsroot/test"))
341 result = pytester.runpytest()
342 assert result.ret == ExitCode.NO_TESTS_COLLECTED
343
344
345def test_conftest_uppercase(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

mkdirMethod · 0.45
makepyfileMethod · 0.45
chdirMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected