]> granicus.if.org Git - python/commitdiff
Make this change a little more robust for up-merging.
authorBarry Warsaw <barry@python.org>
Mon, 1 Dec 2014 23:15:26 +0000 (18:15 -0500)
committerBarry Warsaw <barry@python.org>
Mon, 1 Dec 2014 23:15:26 +0000 (18:15 -0500)
Lib/test/test_py_compile.py

index 148ab805f31cf20e55faefecf9ffe64409ae4d5e..e99c3172776a350e14a2df47c89ef1c5a309f982 100644 (file)
@@ -3,6 +3,7 @@ import os
 import py_compile
 import shutil
 import stat
+import sys
 import tempfile
 import unittest
 
@@ -107,7 +108,7 @@ class PyCompileTests(unittest.TestCase):
         pyc_path = weird_path + 'c'
         self.assertEqual(
             '/'.join(cache_path.split('/')[-2:]),
-            '__pycache__/foo.bar.cpython-34.pyc')
+            '__pycache__/foo.bar.{}.pyc'.format(sys.implementation.cache_tag))
         with open(weird_path, 'w') as file:
             file.write('x = 123\n')
         py_compile.compile(weird_path)