Commit 89642ca5 authored by Éric Araujo's avatar Éric Araujo

Merge touch-ups and fixes for #9831 (+port fix to packaging) and #9223 from 3.2

parents 2c6268e3 a2ce8ffe
......@@ -57,12 +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)
if not sys.dont_write_bytecode:
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()
......@@ -110,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment