3838# SOFTWARE.
3939
4040import sys
41+ from unittest import skipIf
4142
4243from . import CPyExtType , CPyExtTestCase , CPyExtFunction , unhandled_error_compare , assert_raises
4344
4445__dir__ = __file__ .rpartition ("/" )[0 ]
46+ is_windows = sys .platform == "win32"
4547
4648
4749def _reference_bytes (args ):
@@ -328,10 +330,9 @@ def test_managed_class_with_native_base(self):
328330 NativeModule = CPyExtType ("NativeModule_" ,
329331 '''
330332 PyTypeObject NativeBase_Type = {
331- PyVarObject_HEAD_INIT(&PyType_Type , 0)
333+ .ob_base = PyVarObject_HEAD_INIT(NULL , 0)
332334 .tp_name = "NativeModule_.NativeBase",
333335 .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
334- .tp_base = &PyModule_Type,
335336 };
336337
337338 static PyObject* get_NativeBase_type(PyObject* cls) {
@@ -342,6 +343,8 @@ def test_managed_class_with_native_base(self):
342343 tp_methods = '''{"get_NativeBase_type", (PyCFunction)get_NativeBase_type, METH_NOARGS | METH_CLASS, ""}''' ,
343344 ready_code = '''
344345 /* testing lazy type initialization */
346+ NativeBase_Type.tp_base = &PyModule_Type; // because of MSVC..
347+ NativeBase_Type.ob_base.ob_base.ob_type = &PyType_Type;
345348 // if (PyType_Ready(&NativeBase_Type) < 0)
346349 // return NULL;
347350 ''' ,
@@ -1424,6 +1427,7 @@ def test_take_ownership(self):
14241427 obj .clear_value ()
14251428 assert value == (1 , 2 , 3 , "hello" , "world" , dummy )
14261429
1430+ @skipIf (is_windows ) # GR-52900
14271431 def test_async_slots (self ):
14281432 import asyncio , types , functools
14291433 TestTpAsync = CPyExtType ("TestTpAsync" ,
0 commit comments