summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-05-28 22:29:56 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-05-28 22:29:56 (GMT)
commitc5069e00705a499c2db37deb5d0eefae791d39ea (patch)
treeb1510d869e20dd304ba9b48ccb2c575682f05f15 /Lib/distutils/tests
parentb5096f739b0acde489826d1ca5c18cb22fa51ed2 (diff)
parent456ae893d7a0b40a5346cbba7771127aca2113e9 (diff)
downloadcpython-c5069e00705a499c2db37deb5d0eefae791d39ea.zip
cpython-c5069e00705a499c2db37deb5d0eefae791d39ea.tar.gz
cpython-c5069e00705a499c2db37deb5d0eefae791d39ea.tar.bz2
Merge doc touch-ups and fixes for #9831 and #9223 from 3.1
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r--Lib/distutils/tests/test_build_py.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py
index da3232c..4e46339 100644
--- a/Lib/distutils/tests/test_build_py.py
+++ b/Lib/distutils/tests/test_build_py.py
@@ -57,11 +57,15 @@ class BuildPyTestCase(support.TempdirManager,
self.assertEqual(len(cmd.get_outputs()), 3)
pkgdest = os.path.join(destination, "pkg")
files = os.listdir(pkgdest)
- self.assertTrue("__init__.py" in files)
- self.assertTrue("__init__.pyc" in files)
- self.assertTrue("README.txt" in files)
-
- def test_empty_package_dir (self):
+ self.assertIn("__init__.py", files)
+ self.assertIn("README.txt", files)
+ # XXX even with -O, distutils writes pyc, not pyo; bug?
+ if sys.dont_write_bytecode:
+ self.assertNotIn("__init__.pyc", files)
+ else:
+ self.assertIn("__init__.pyc", files)
+
+ def test_empty_package_dir(self):
# See SF 1668596/1720897.
cwd = os.getcwd()
@@ -109,7 +113,7 @@ class BuildPyTestCase(support.TempdirManager,
finally:
sys.dont_write_bytecode = old_dont_write_bytecode
- self.assertTrue('byte-compiling is disabled' in self.logs[0][1])
+ self.assertIn('byte-compiling is disabled', self.logs[0][1])
def test_suite():
return unittest.makeSuite(BuildPyTestCase)