diff options
Diffstat (limited to 'sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py')
-rw-r--r-- | sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py b/sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py index c40770862..648b35e41 100644 --- a/sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py +++ b/sources/shiboken2/tests/samplebinding/pointerprimitivetype_test.py @@ -44,11 +44,17 @@ because typing.Sequence is a subclass, but we will generalize this to typing.Iterable in the future. """ +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from shiboken_paths import init_paths +init_paths() from sample import IntArray2, VirtualMethods import shiboken2 -type.__signature__ # trigger init, which does not happen in tests +_init_pyside_extension() # trigger init, which does not happen in tests from shibokensupport.signature import typing @@ -64,10 +70,7 @@ class PointerPrimitiveTypeTest(unittest.TestCase): self.assertTrue(found) ann = sig.parameters["data"].annotation self.assertEqual(ann.__args__, (int,)) - # un-specify this class (forget "int") by setting the _special - # flag, so we can check using issubclass (undocumented feature). - ann._special = True - self.assertTrue(issubclass(ann, typing.Iterable)) + self.assertTrue(issubclass(ann.__origin__, typing.Iterable)) def testReturnVarSignature(self): # signature="getMargins(int*,int*,int*,int*)const"> |