def test_conftest_badcase(pytester: Pytester) -> None:
    """Check conftest.py loading when directory casing is wrong (#5792)."""
    pytester.path.joinpath("JenkinsRoot/test").mkdir(parents=True)
    source = {"setup.py": "", "test/__init__.py": "", "test/conftest.py": ""}
    pytester.makepyfile(**{f"JenkinsRoot/{k}": v for k, v in source.items()})

    os.chdir(pytester.path.joinpath("jenkinsroot/test"))
    result = pytester.runpytest()
    assert result.ret == ExitCode.NO_TESTS_COLLECTED
Check conftest.py loading when directory casing is wrong (#5792).
testing/test_conftest.py