diff options
| author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-10-25 23:16:51 +0000 |
|---|---|---|
| committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-10-25 23:16:51 +0000 |
| commit | 4d70c7aa04be70bf8fdf486d70c3c383271d7a8b (patch) | |
| tree | 510496773f0b5bde2550b087c26a5f7506c0ba54 /tests/test_build_py.py | |
| parent | 57a2a657c29720facb1cd04f28751608323f9c6d (diff) | |
| download | python-setuptools-git-4d70c7aa04be70bf8fdf486d70c3c383271d7a8b.tar.gz | |
Merged revisions 75704 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r75704 | tarek.ziade | 2009-10-26 00:08:47 +0100 (Mon, 26 Oct 2009) | 17 lines
Merged revisions 75669-75671 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75669 | tarek.ziade | 2009-10-24 17:10:37 +0200 (Sat, 24 Oct 2009) | 1 line
Issue #7071: byte-compilation in Distutils now looks at sys.dont_write_bytecode
........
r75670 | tarek.ziade | 2009-10-24 17:19:03 +0200 (Sat, 24 Oct 2009) | 1 line
fixed finally state in distutils.test_util
........
r75671 | tarek.ziade | 2009-10-24 17:51:30 +0200 (Sat, 24 Oct 2009) | 1 line
fixed warning and error message
........
................
Diffstat (limited to 'tests/test_build_py.py')
| -rw-r--r-- | tests/test_build_py.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_build_py.py b/tests/test_build_py.py index 8ad3bbc4..582f2463 100644 --- a/tests/test_build_py.py +++ b/tests/test_build_py.py @@ -89,6 +89,22 @@ class BuildPyTestCase(support.TempdirManager, os.chdir(cwd) sys.stdout = sys.__stdout__ + def test_dont_write_bytecode(self): + # makes sure byte_compile is not used + pkg_dir, dist = self.create_dist() + cmd = build_py(dist) + cmd.compile = 1 + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + self.assertTrue('byte-compiling is disabled' in self.logs[0][1]) + def test_suite(): return unittest.makeSuite(BuildPyTestCase) |
