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

Method test_pycache_is_a_file

testing/test_assertrewrite.py:756–763  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

754
755class TestRewriteOnImport:
756 def test_pycache_is_a_file(self, pytester: Pytester) -> None:
757 pytester.path.joinpath("__pycache__").write_text("Hello")
758 pytester.makepyfile(
759 """
760 def test_rewritten():
761 assert "@py_builtins" in globals()"""
762 )
763 assert pytester.runpytest().ret == 0
764
765 def test_pycache_is_readonly(self, pytester: Pytester) -> None:
766 cache = pytester.mkdir("__pycache__")

Callers

nothing calls this directly

Calls 2

makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected