diff options
author | Brett Cannon <brett@python.org> | 2013-06-15 16:59:53 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-06-15 16:59:53 (GMT) |
commit | 61c3556c14d52e553ca5eecc4e178124fac75167 (patch) | |
tree | ecadf6dc78159a42de1f2173599e2eb9a7c29254 /Lib/distutils/tests/test_build_py.py | |
parent | 7822e123c42b63c5819e0b6cca6f960b1ce55547 (diff) | |
download | cpython-61c3556c14d52e553ca5eecc4e178124fac75167.zip cpython-61c3556c14d52e553ca5eecc4e178124fac75167.tar.gz cpython-61c3556c14d52e553ca5eecc4e178124fac75167.tar.bz2 |
Issue #17177: Stop using imp in distutils
Diffstat (limited to 'Lib/distutils/tests/test_build_py.py')
-rw-r--r-- | Lib/distutils/tests/test_build_py.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py index e416edd..1b410c3 100644 --- a/Lib/distutils/tests/test_build_py.py +++ b/Lib/distutils/tests/test_build_py.py @@ -2,7 +2,6 @@ import os import sys -import imp import unittest from distutils.command.build_py import build_py @@ -63,7 +62,8 @@ class BuildPyTestCase(support.TempdirManager, self.assertFalse(os.path.exists(pycache_dir)) else: pyc_files = os.listdir(pycache_dir) - self.assertIn("__init__.%s.pyc" % imp.get_tag(), pyc_files) + self.assertIn("__init__.%s.pyc" % sys.implementation.cache_tag, + pyc_files) def test_empty_package_dir(self): # See bugs #1668596/#1720897 @@ -102,7 +102,8 @@ class BuildPyTestCase(support.TempdirManager, found = os.listdir(cmd.build_lib) self.assertEqual(sorted(found), ['__pycache__', 'boiledeggs.py']) found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) - self.assertEqual(found, ['boiledeggs.%s.pyc' % imp.get_tag()]) + self.assertEqual(found, + ['boiledeggs.%s.pyc' % sys.implementation.cache_tag]) @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled') def test_byte_compile_optimized(self): @@ -119,7 +120,8 @@ class BuildPyTestCase(support.TempdirManager, found = os.listdir(cmd.build_lib) self.assertEqual(sorted(found), ['__pycache__', 'boiledeggs.py']) found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) - self.assertEqual(sorted(found), ['boiledeggs.%s.pyo' % imp.get_tag()]) + self.assertEqual(sorted(found), + ['boiledeggs.%s.pyo' % sys.implementation.cache_tag]) def test_dont_write_bytecode(self): # makes sure byte_compile is not used |