(self)
| 1701 | |
| 1702 | @skip_if_dont_write_bytecode |
| 1703 | def test_missing_source(self): |
| 1704 | # With PEP 3147 cache layout, removing the source but leaving the pyc |
| 1705 | # file does not satisfy the import. |
| 1706 | __import__(TESTFN) |
| 1707 | pyc_file = importlib.util.cache_from_source(self.source) |
| 1708 | self.assertTrue(os.path.exists(pyc_file)) |
| 1709 | os.remove(self.source) |
| 1710 | forget(TESTFN) |
| 1711 | importlib.invalidate_caches() |
| 1712 | self.assertRaises(ImportError, __import__, TESTFN) |
| 1713 | |
| 1714 | @skip_if_dont_write_bytecode |
| 1715 | def test_missing_source_legacy(self): |
nothing calls this directly
no test coverage detected