From: Stefan Krah Date: Sat, 26 Jan 2013 12:06:36 +0000 (+0100) Subject: Adapt test_bytes for a build --without-doc-strings. X-Git-Tag: v3.3.1rc1~286 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e572b8b2e34bc88d0485c1ed1c0e4a5157e3a62;p=thirdparty%2FPython%2Fcpython.git Adapt test_bytes for a build --without-doc-strings. --- diff --git a/Lib/test/support.py b/Lib/test/support.py index 1e3aef0b5dee..d44436b44660 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -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 diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 26cb49809174..3520e837a172 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -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__)