summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests/test_install_lib.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-07-22 12:50:05 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2010-07-22 12:50:05 (GMT)
commit3679727939a9d25ccfe057e71e8a4b8be73d47ce (patch)
tree88326b8ec80cf57f51d2e093143e233ec4ce1be5 /Lib/distutils/tests/test_install_lib.py
parent5db0c94072abad10c9d2df99eefd1f51eb84f2bc (diff)
downloadcpython-3679727939a9d25ccfe057e71e8a4b8be73d47ce.zip
cpython-3679727939a9d25ccfe057e71e8a4b8be73d47ce.tar.gz
cpython-3679727939a9d25ccfe057e71e8a4b8be73d47ce.tar.bz2
reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Diffstat (limited to 'Lib/distutils/tests/test_install_lib.py')
-rw-r--r--Lib/distutils/tests/test_install_lib.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/Lib/distutils/tests/test_install_lib.py b/Lib/distutils/tests/test_install_lib.py
index 13d27ab..99a6d90 100644
--- a/Lib/distutils/tests/test_install_lib.py
+++ b/Lib/distutils/tests/test_install_lib.py
@@ -1,6 +1,6 @@
"""Tests for distutils.command.install_data."""
-import os
import sys
+import os
import unittest
from distutils.command.install_lib import install_lib
@@ -31,7 +31,9 @@ class InstallLibTestCase(support.TempdirManager,
cmd.finalize_options()
self.assertEquals(cmd.optimize, 2)
- def _setup_byte_compile(self):
+ @unittest.skipUnless(not sys.dont_write_bytecode,
+ 'byte-compile not supported')
+ def test_byte_compile(self):
pkg_dir, dist = self.create_dist()
cmd = install_lib(dist)
cmd.compile = cmd.optimize = 1
@@ -39,15 +41,8 @@ class InstallLibTestCase(support.TempdirManager,
f = os.path.join(pkg_dir, 'foo.py')
self.write_file(f, '# python file')
cmd.byte_compile([f])
- return pkg_dir
-
- @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile not enabled')
- def test_byte_compile(self):
- pkg_dir = self._setup_byte_compile()
- if sys.flags.optimize < 1:
- self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc')))
- else:
- self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo')))
+ self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc')))
+ self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo')))
def test_get_outputs(self):
pkg_dir, dist = self.create_dist()