(self)
| 215 | |
| 216 | |
| 217 | def test_optimize(self): |
| 218 | # make sure compiling with different optimization settings than the |
| 219 | # interpreter's creates the correct file names |
| 220 | optimize, opt = (1, 1) if __debug__ else (0, '') |
| 221 | compileall.compile_dir(self.directory, quiet=True, optimize=optimize) |
| 222 | cached = importlib.util.cache_from_source(self.source_path, |
| 223 | optimization=opt) |
| 224 | self.assertTrue(os.path.isfile(cached)) |
| 225 | cached2 = importlib.util.cache_from_source(self.source_path2, |
| 226 | optimization=opt) |
| 227 | self.assertTrue(os.path.isfile(cached2)) |
| 228 | cached3 = importlib.util.cache_from_source(self.source_path3, |
| 229 | optimization=opt) |
| 230 | self.assertTrue(os.path.isfile(cached3)) |
| 231 | |
| 232 | def test_compile_dir_pathlike(self): |
| 233 | self.assertFalse(os.path.isfile(self.bc_path)) |
nothing calls this directly
no test coverage detected