(self)
| 1689 | @os_helper.skip_if_dac_override |
| 1690 | @unittest.skipIf(is_emscripten, "umask is a stub") |
| 1691 | def test_unwritable_directory(self): |
| 1692 | # When the umask causes the new __pycache__ directory to be |
| 1693 | # unwritable, the import still succeeds but no .pyc file is written. |
| 1694 | with temp_umask(0o222): |
| 1695 | __import__(TESTFN) |
| 1696 | self.assertTrue(os.path.exists('__pycache__')) |
| 1697 | pyc_path = importlib.util.cache_from_source(self.source) |
| 1698 | self.assertFalse(os.path.exists(pyc_path), |
| 1699 | 'bytecode file {!r} for {!r} ' |
| 1700 | 'exists'.format(pyc_path, TESTFN)) |
| 1701 | |
| 1702 | @skip_if_dont_write_bytecode |
| 1703 | def test_missing_source(self): |
nothing calls this directly
no test coverage detected