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

Method test_pyimport_dir

testing/_py/test_local.py:1036–1042  ·  testing/_py/test_local.py::TestImport.test_pyimport_dir
(self, tmpdir)

Source from the content-addressed store, hash-verified

1034 path.pyimport()
1035
1036 def test_pyimport_dir(self, tmpdir):
1037 p = tmpdir.join(class="st">"hello_123")
1038 p_init = p.ensure(class="st">"__init__.py")
1039 m = p.pyimport()
1040 assert m.__name__ == class="st">"hello_123"
1041 m = p_init.pyimport()
1042 assert m.__name__ == class="st">"hello_123"
1043
1044 def test_pyimport_execfile_different_name(self, path1):
1045 obj = path1.join(class="st">"execfile.py").pyimport(modname=class="st">"0x.y.z")

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
ensureMethod · 0.80
pyimportMethod · 0.80

Tested by

no test coverage detected