from ctypes import (CDLL, Structure, CFUNCTYPE, pointer,
c_void_p, c_char_p, c_wchar_p,
c_char, c_wchar, c_int, c_double)
-from test.support import import_helper
+from test.support import import_helper, thread_unsafe
_ctypes_test = import_helper.import_module("_ctypes_test")
class Y(X):
_fields_ = [("str", c_char_p)]
-
class PickleTest:
def dumps(self, item):
return pickle.dumps(item, self.proto)
self.assertEqual(memoryview(src).tobytes(),
memoryview(dst).tobytes())
+ @thread_unsafe('not thread safe')
def test_struct(self):
X.init_called = 0
import sys
import unittest
from test import support
-from test.support import import_helper
+from test.support import import_helper, thread_unsafe
from test.support import script_helper
_ctypes_test = import_helper.import_module("_ctypes_test")
dll = ctypes.CDLL(_ctypes_test.__file__)
-
+@thread_unsafe('not thread safe')
class RefcountTestCase(unittest.TestCase):
@support.refcount_test
def test_1(self):
gc.collect()
self.assertEqual(sys.getrefcount(func), orig_refcount)
-
+@thread_unsafe('not thread safe')
class AnotherLeak(unittest.TestCase):
def test_callback(self):
proto = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_int)