(self, tmpdir)
| 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") |