def test_compile_path(self):
    with test.test_importlib.util.import_state(path=[self.directory]):
        self.assertTrue(compileall.compile_path(quiet=2))
    with test.test_importlib.util.import_state(path=[self.directory]):
        self.add_bad_source_file()
        self.assertFalse(compileall.compile_path(skip_curdir=False, force=True, quiet=2))
def test_compile_path(self):
    with test.test_importlib.util.import_state(path=[self.directory]):
        self.assertTrue(compileall.compile_path(quiet=2))
    with test.test_importlib.util.import_state(path=[self.directory]):
        self.add_bad_source_file()
        self.assertFalse(compileall.compile_path(skip_curdir=False, force=True, quiet=2))