]> granicus.if.org Git - python/commitdiff
Issue #12120, Issue #12119: tests were missing a sys.dont_write_bytecode check
authorTarek Ziade <tarek@ziade.org>
Thu, 19 May 2011 17:56:12 +0000 (19:56 +0200)
committerTarek Ziade <tarek@ziade.org>
Thu, 19 May 2011 17:56:12 +0000 (19:56 +0200)
Lib/distutils/tests/test_build_py.py
Lib/packaging/tests/test_command_build_py.py
Misc/NEWS

index da3232cea8fe2c0a43f21882edab8d85d96889a1..00a57cc922645a39f9be7ccce3855554f5461977 100644 (file)
@@ -58,7 +58,8 @@ class BuildPyTestCase(support.TempdirManager,
         pkgdest = os.path.join(destination, "pkg")
         files = os.listdir(pkgdest)
         self.assertTrue("__init__.py" in files)
-        self.assertTrue("__init__.pyc" 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):
index 3c5630b23f71c6669d59e28d3d48c4fdab94d117..b6d60de32c21bd43b37209f71f23fcdd6c74866c 100644 (file)
@@ -61,7 +61,8 @@ class BuildPyTestCase(support.TempdirManager,
         pkgdest = os.path.join(destination, "pkg")
         files = os.listdir(pkgdest)
         self.assertIn("__init__.py", files)
-        self.assertIn("__init__.pyc", files)
+        if not sys.dont_write_bytecode:
+            self.assertIn("__init__.pyc", files)
         self.assertIn("README.txt", files)
 
     def test_empty_package_dir(self):
index 1ec836ef2b1d9e0141c2359863bd0e66877aded9..f944a1e731e4a1198e6fcd55ce12e052f3019d63 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -153,6 +153,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #12120, #12119: skip a test in packaging and distutils
+  if sys.dont_write_bytecode is set to True.
+
 - Issue #12065: connect_ex() on an SSL socket now returns the original errno
   when the socket's timeout expires (it used to return None).