]> granicus.if.org Git - python/commitdiff
Adapt test_bytes for a build --without-doc-strings.
authorStefan Krah <skrah@bytereef.org>
Sat, 26 Jan 2013 12:06:36 +0000 (13:06 +0100)
committerStefan Krah <skrah@bytereef.org>
Sat, 26 Jan 2013 12:06:36 +0000 (13:06 +0100)
Lib/test/support.py
Lib/test/test_bytes.py

index 1e3aef0b5deec5d50d3d7f9db55761d624c9d1fd..d44436b44660cd6562db1f7a28cf329e7f1280ae 100644 (file)
@@ -590,6 +590,10 @@ requires_bz2 = unittest.skipUnless(bz2, 'requires bz2')
 
 requires_lzma = unittest.skipUnless(lzma, 'requires lzma')
 
+requires_docstrings = unittest.skipUnless(
+    sysconfig.get_config_var('WITH_DOC_STRINGS'),
+    "test requires docstrings")
+
 is_jython = sys.platform.startswith('java')
 
 # Filename used for testing
index 26cb4980917462aca0381b0013a305a12938a832..3520e837a17267bca71d99acca702a55dfadb1ac 100644 (file)
@@ -1158,6 +1158,7 @@ class AssortedBytesTest(unittest.TestCase):
         self.assertEqual(bytes(b"abc") < b"ab", False)
         self.assertEqual(bytes(b"abc") <= b"ab", False)
 
+    @test.support.requires_docstrings
     def test_doc(self):
         self.assertIsNotNone(bytearray.__doc__)
         self.assertTrue(bytearray.__doc__.startswith("bytearray("), bytearray.__doc__)