From b3c0942356bcf592097f658bdfc2daf6dad7b346 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Mon, 3 Jul 2006 07:59:50 +0000 Subject: [PATCH] Don't run the doctests with Python 2.3 because it doesn't have the ELLIPSIS flag. --- Lib/ctypes/test/test_objects.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Lib/ctypes/test/test_objects.py b/Lib/ctypes/test/test_objects.py index e49e435fc50..4d921d2e589 100644 --- a/Lib/ctypes/test/test_objects.py +++ b/Lib/ctypes/test/test_objects.py @@ -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)