summaryrefslogtreecommitdiffstats
path: root/Lib/ctypes
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-27 17:47:45 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-27 17:47:45 (GMT)
commit9d0add0c7e513a92ee4321aa5be70121c4c1e1e7 (patch)
treea61b0d0c5ee1c4c727bb55754b505cd59ecc0446 /Lib/ctypes
parent6f02ea02c881e06029e8d44a5414682bc4b65fb8 (diff)
downloadcpython-9d0add0c7e513a92ee4321aa5be70121c4c1e1e7.zip
cpython-9d0add0c7e513a92ee4321aa5be70121c4c1e1e7.tar.gz
cpython-9d0add0c7e513a92ee4321aa5be70121c4c1e1e7.tar.bz2
Issue #17041: Fix testing when Python is configured with the
--without-doc-strings.
Diffstat (limited to 'Lib/ctypes')
-rw-r--r--Lib/ctypes/test/test_win32.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/ctypes/test/test_win32.py b/Lib/ctypes/test/test_win32.py
index 2534a74..7e6fe3f 100644
--- a/Lib/ctypes/test/test_win32.py
+++ b/Lib/ctypes/test/test_win32.py
@@ -3,6 +3,7 @@
from ctypes import *
from ctypes.test import is_resource_enabled
import unittest, sys
+from test import support
import _ctypes_test
@@ -60,7 +61,9 @@ if sys.platform == "win32":
def test_COMError(self):
from _ctypes import COMError
- self.assertEqual(COMError.__doc__, "Raised when a COM method call failed.")
+ if support.HAVE_DOCSTRINGS:
+ self.assertEqual(COMError.__doc__,
+ "Raised when a COM method call failed.")
ex = COMError(-1, "text", ("details",))
self.assertEqual(ex.hresult, -1)