def test_optimize(self):
    (optimize, opt) = ((1, 1) if __debug__ else (0, ''))
    compileall.compile_dir(self.directory, quiet=True, optimize=optimize)
    cached = importlib.util.cache_from_source(self.source_path, optimization=opt)
    self.assertTrue(os.path.isfile(cached))
    cached2 = importlib.util.cache_from_source(self.source_path2, optimization=opt)
    self.assertTrue(os.path.isfile(cached2))
    cached3 = importlib.util.cache_from_source(self.source_path3, optimization=opt)
    self.assertTrue(os.path.isfile(cached3))
def test_optimize(self):
    (optimize, opt) = ((1, 1) if __debug__ else (0, ))
    compileall.compile_dir(self.directory, quiet=True, optimize=optimize)
    cached = importlib.util.cache_from_source(self.source_path, optimization=opt)
    self.assertTrue(os.path.isfile(cached))
    cached2 = importlib.util.cache_from_source(self.source_path2, optimization=opt)
    self.assertTrue(os.path.isfile(cached2))
    cached3 = importlib.util.cache_from_source(self.source_path3, optimization=opt)
    self.assertTrue(os.path.isfile(cached3))