diff options
author | Barry Warsaw <barry@python.org> | 2014-12-02 16:30:43 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2014-12-02 16:30:43 (GMT) |
commit | eb2763dd436f0ca1ea8033a56503f6ba6ee8e779 (patch) | |
tree | 288e12d1d9b4fd1e8a6dc68394263f844b9452d4 /Lib/test/test_py_compile.py | |
parent | 83cf99d733acb49c70dd9548eeccfc724e707531 (diff) | |
download | cpython-eb2763dd436f0ca1ea8033a56503f6ba6ee8e779.zip cpython-eb2763dd436f0ca1ea8033a56503f6ba6ee8e779.tar.gz cpython-eb2763dd436f0ca1ea8033a56503f6ba6ee8e779.tar.bz2 |
Fix the test to use an os.sep agnostic test. Hopefully this will fix the
Windows buildbots. Found by Jeremy Kloth.
Diffstat (limited to 'Lib/test/test_py_compile.py')
-rw-r--r-- | Lib/test/test_py_compile.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py index e99c317..1abea27 100644 --- a/Lib/test/test_py_compile.py +++ b/Lib/test/test_py_compile.py @@ -106,9 +106,13 @@ class PyCompileTests(unittest.TestCase): weird_path = os.path.join(self.directory, 'foo.bar.py') cache_path = importlib.util.cache_from_source(weird_path) pyc_path = weird_path + 'c' + head, tail = os.path.split(cache_path) + penultimate_tail = os.path.basename(head) self.assertEqual( - '/'.join(cache_path.split('/')[-2:]), - '__pycache__/foo.bar.{}.pyc'.format(sys.implementation.cache_tag)) + os.path.join(penultimate_tail, tail), + os.path.join( + '__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) |