summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-08-22 17:52:37 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2014-08-22 17:52:37 (GMT)
commit04bb443eb645bacaa8f347261a6313a8055351cf (patch)
tree6b78629ef2f74a97972346a56135ff00de102015
parent5296db908a13b36b5ff69bf12446ef184cee5d3a (diff)
parent0242f79051cd43343bafa797c2bfa9512f7be6c2 (diff)
downloadcpython-04bb443eb645bacaa8f347261a6313a8055351cf.zip
cpython-04bb443eb645bacaa8f347261a6313a8055351cf.tar.gz
cpython-04bb443eb645bacaa8f347261a6313a8055351cf.tar.bz2
Issue #19447: Use importlib.util.cache_from_source() instead of ``bad_coding + 'c'``.
Thanks to Arfrever Frehtes Taifersar Arahesis.
-rw-r--r--Lib/test/test_py_compile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
index 5edfafd..640dcc3 100644
--- a/Lib/test/test_py_compile.py
+++ b/Lib/test/test_py_compile.py
@@ -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()