diff options
author | Christian Tismer <tismer@stackless.com> | 2021-04-18 18:58:18 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2021-11-19 14:53:57 +0100 |
commit | 2385c01953c4fe0986fc2d490b718967e2b3b2c9 (patch) | |
tree | d51953f6ddf75ffa6421e171c4253c500e559687 /sources/shiboken6/tests/otherbinding | |
parent | 4805d04ec67e215dfe9c6384b73a3c59e0f53a68 (diff) |
PyPySide: replace the __signature__ attribute by get_signature()
In PyPy, types cannot simply be patched. It would be
quite some effort to derive extra heap types for that.
Instead, we use `get_signature()` for all tests, which
has the same effect.
Task-number: PYSIDE-535
Change-Id: I8d9e4adcfc33231d0cd96260feaf2b205bef9a18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/tests/otherbinding')
-rw-r--r-- | sources/shiboken6/tests/otherbinding/signature_test.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/shiboken6/tests/otherbinding/signature_test.py b/sources/shiboken6/tests/otherbinding/signature_test.py index 9f94edd34..3160ce5fa 100644 --- a/sources/shiboken6/tests/otherbinding/signature_test.py +++ b/sources/shiboken6/tests/otherbinding/signature_test.py @@ -43,12 +43,18 @@ init_paths() from other import OtherObjectType from shiboken_test_helper import objectFullname +from shiboken6 import Shiboken +_init_pyside_extension() # trigger bootstrap + +from shibokensupport.signature import get_signature + + class SignatureTest(unittest.TestCase): # Check if the argument of 'OtherObjectType::enumAsInt(SampleNamespace::SomeClass::PublicScopedEnum value)' # has the correct representation def testNamespaceFromOtherModule(self): - argType = OtherObjectType.enumAsInt.__signature__.parameters['value'].annotation + argType = get_signature(OtherObjectType.enumAsInt).parameters['value'].annotation self.assertEqual(objectFullname(argType), 'sample.SampleNamespace.SomeClass.PublicScopedEnum') if __name__ == '__main__': |