summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-02-07 14:58:44 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2013-02-07 14:58:44 +0200
commitc2255ac153194b285730034ae37d4dbc8a31c39b (patch)
tree600b4d8e78ecbddb7e4c42b551531b0b23945c0a
parentb98e96a23f636b304c10d570bc1420a9ae213e08 (diff)
downloadcpython-git-c2255ac153194b285730034ae37d4dbc8a31c39b.tar.gz
Fix test_from_dll* in test_returnfuncptrs.py.
-rw-r--r--Lib/ctypes/test/test_returnfuncptrs.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/ctypes/test/test_returnfuncptrs.py b/Lib/ctypes/test/test_returnfuncptrs.py
index 6b2d047ed1..93eba6bb76 100644
--- a/Lib/ctypes/test/test_returnfuncptrs.py
+++ b/Lib/ctypes/test/test_returnfuncptrs.py
@@ -34,31 +34,30 @@ class ReturnFuncPtrTestCase(unittest.TestCase):
self.assertRaises(ArgumentError, strchr, b"abcdef", 3.0)
self.assertRaises(TypeError, strchr, b"abcdef")
- @unittest.skipIf(os.name == 'nt', 'Temporarily disabled for Windows')
def test_from_dll(self):
dll = CDLL(_ctypes_test.__file__)
# _CFuncPtr instances are now callable with a tuple argument
# which denotes a function name and a dll:
- strchr = CFUNCTYPE(c_char_p, c_char_p, c_char)(("strchr", dll))
+ strchr = CFUNCTYPE(c_char_p, c_char_p, c_char)(("my_strchr", dll))
self.assertTrue(strchr(b"abcdef", b"b"), "bcdef")
self.assertEqual(strchr(b"abcdef", b"x"), None)
self.assertRaises(ArgumentError, strchr, b"abcdef", 3.0)
self.assertRaises(TypeError, strchr, b"abcdef")
- @unittest.skipIf(os.name == 'nt', 'Temporarily disabled for Windows')
# Issue 6083: Reference counting bug
def test_from_dll_refcount(self):
class BadSequence(tuple):
def __getitem__(self, key):
if key == 0:
- return "strchr"
+ return "my_strchr"
if key == 1:
return CDLL(_ctypes_test.__file__)
raise IndexError
# _CFuncPtr instances are now callable with a tuple argument
# which denotes a function name and a dll:
- strchr = CFUNCTYPE(c_char_p, c_char_p, c_char)(BadSequence(("strchr", CDLL(_ctypes_test.__file__))))
+ strchr = CFUNCTYPE(c_char_p, c_char_p, c_char)(
+ BadSequence(("my_strchr", CDLL(_ctypes_test.__file__))))
self.assertTrue(strchr(b"abcdef", b"b"), "bcdef")
self.assertEqual(strchr(b"abcdef", b"x"), None)
self.assertRaises(ArgumentError, strchr, b"abcdef", 3.0)