mirror of
https://github.com/python/cpython.git
synced 2024-12-05 07:43:50 +08:00
Issue #19447: Use importlib.util.cache_from_source() instead of `bad_coding + 'c'
`.
Thanks to Arfrever Frehtes Taifersar Arahesis.
This commit is contained in:
parent
31f8a677a4
commit
0242f79051
@ -95,7 +95,8 @@ class PyCompileTests(unittest.TestCase):
|
||||
def test_bad_coding(self):
|
||||
bad_coding = os.path.join(os.path.dirname(__file__), 'bad_coding2.py')
|
||||
self.assertIsNone(py_compile.compile(bad_coding, doraise=False))
|
||||
self.assertFalse(os.path.exists(bad_coding + 'c'))
|
||||
self.assertFalse(os.path.exists(
|
||||
importlib.util.cache_from_source(bad_coding)))
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user