]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't run the doctests with Python 2.3 because it doesn't have the ELLIPSIS flag.
authorThomas Heller <theller@ctypes.org>
Mon, 3 Jul 2006 07:59:50 +0000 (07:59 +0000)
committerThomas Heller <theller@ctypes.org>
Mon, 3 Jul 2006 07:59:50 +0000 (07:59 +0000)
Lib/ctypes/test/test_objects.py

index e49e435fc501354df97561f0442b635801e91ddb..4d921d2e589b93b090619a7fee8d9514d34b431f 100644 (file)
@@ -54,13 +54,17 @@ of 'x' ('_b_base_' is either None, or the root object owning the memory block):
 
 '''
 
-import unittest, doctest
+import unittest, doctest, sys
 
 import ctypes.test.test_objects
 
 class TestCase(unittest.TestCase):
-    def test(self):
-        doctest.testmod(ctypes.test.test_objects)
+    if sys.hexversion > 0x02040000:
+        # Python 2.3 has no ELLIPSIS flag, so we don't test with this
+        # version:
+        def test(self):
+            doctest.testmod(ctypes.test.test_objects)
 
 if __name__ == '__main__':
-    doctest.testmod(ctypes.test.test_objects)
+    if sys.hexversion > 0x02040000:
+        doctest.testmod(ctypes.test.test_objects)