summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_command_install_lib.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-09-17 01:31:51 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-09-17 01:31:51 (GMT)
commit7724a6c10c56a1b14b4933de368e672eae840f47 (patch)
tree1b3bd60ab9b79bd018cbc942a8e12140b2e18576 /Lib/packaging/tests/test_command_install_lib.py
parent37ccd6f794539e0678b7a7ad938e571cc73e106c (diff)
downloadcpython-7724a6c10c56a1b14b4933de368e672eae840f47.zip
cpython-7724a6c10c56a1b14b4933de368e672eae840f47.tar.gz
cpython-7724a6c10c56a1b14b4933de368e672eae840f47.tar.bz2
Packaging cleanup: remove conditionals for < 2.6 support.
PEP 370 features and sys.dont_write_bytecode are always available in 3.3; the distutils2 backport still has the conditionals. I also renamed an internal misnamed method and fixed a few things (“packaging2” name, stray print, unused import, fd leak).
Diffstat (limited to 'Lib/packaging/tests/test_command_install_lib.py')
-rw-r--r--Lib/packaging/tests/test_command_install_lib.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/Lib/packaging/tests/test_command_install_lib.py b/Lib/packaging/tests/test_command_install_lib.py
index b46f3bd..d36120b 100644
--- a/Lib/packaging/tests/test_command_install_lib.py
+++ b/Lib/packaging/tests/test_command_install_lib.py
@@ -7,13 +7,6 @@ from packaging.command.install_lib import install_lib
from packaging.compiler.extension import Extension
from packaging.errors import PackagingOptionError
-try:
- no_bytecode = sys.dont_write_bytecode
- bytecode_support = True
-except AttributeError:
- no_bytecode = False
- bytecode_support = False
-
class InstallLibTestCase(support.TempdirManager,
support.LoggingCatcher,
@@ -40,7 +33,7 @@ class InstallLibTestCase(support.TempdirManager,
cmd.finalize_options()
self.assertEqual(cmd.optimize, 2)
- @unittest.skipIf(no_bytecode, 'byte-compile not supported')
+ @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile not supported')
def test_byte_compile(self):
pkg_dir, dist = self.create_dist()
cmd = install_lib(dist)
@@ -89,8 +82,6 @@ class InstallLibTestCase(support.TempdirManager,
# get_input should return 2 elements
self.assertEqual(len(cmd.get_inputs()), 2)
- @unittest.skipUnless(bytecode_support,
- 'sys.dont_write_bytecode not supported')
def test_dont_write_bytecode(self):
# makes sure byte_compile is not used
pkg_dir, dist = self.create_dist()