(self)
| 1614 | rmtree(TESTFN2) |
| 1615 | |
| 1616 | def test_write_pathlike(self): |
| 1617 | os.mkdir(TESTFN2) |
| 1618 | try: |
| 1619 | with open(os.path.join(TESTFN2, "mod1.py"), "w", encoding='utf-8') as fp: |
| 1620 | fp.write("print(42)\n") |
| 1621 | |
| 1622 | with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp: |
| 1623 | zipfp.writepy(FakePath(os.path.join(TESTFN2, "mod1.py"))) |
| 1624 | names = zipfp.namelist() |
| 1625 | self.assertCompiledIn('mod1.py', names) |
| 1626 | finally: |
| 1627 | rmtree(TESTFN2) |
| 1628 | |
| 1629 | |
| 1630 | class ExtractTests(unittest.TestCase): |
nothing calls this directly
no test coverage detected