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

Method test_package

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

Source from the content-addressed store, hash-verified

925 assert tagged + ".pyc" in os.listdir("__pycache__")
926
927 def test_package(self, pytester: Pytester) -> None:
928 pkg = pytester.path.joinpath("pkg")
929 pkg.mkdir()
930 pkg.joinpath("__init__.py")
931 pkg.joinpath("test_blah.py").write_text(
932 """
933def test_rewritten():
934 assert "@py_builtins" in globals()"""
935 )
936 assert pytester.runpytest().ret == 0
937
938 def test_translate_newlines(self, pytester: Pytester) -> None:
939 content = "def test_rewritten():\r\n assert '@py_builtins' in globals()"

Callers

nothing calls this directly

Calls 2

mkdirMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected