(self)
| 1654 | |
| 1655 | @skip_if_dont_write_bytecode |
| 1656 | def test_missing_source(self): |
| 1657 | # With PEP 3147 cache layout, removing the source but leaving the pyc |
| 1658 | # file does not satisfy the import. |
| 1659 | __import__(TESTFN) |
| 1660 | pyc_file = importlib.util.cache_from_source(self.source) |
| 1661 | self.assertTrue(os.path.exists(pyc_file)) |
| 1662 | os.remove(self.source) |
| 1663 | forget(TESTFN) |
| 1664 | importlib.invalidate_caches() |
| 1665 | self.assertRaises(ImportError, __import__, TESTFN) |
| 1666 | |
| 1667 | @skip_if_dont_write_bytecode |
| 1668 | def test_missing_source_legacy(self): |
nothing calls this directly
no test coverage detected