diff options
Diffstat (limited to 'sources/shiboken6/tests/shiboken_test_helper.py')
-rw-r--r-- | sources/shiboken6/tests/shiboken_test_helper.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/shiboken_test_helper.py b/sources/shiboken6/tests/shiboken_test_helper.py new file mode 100644 index 000000000..14fe6a2d1 --- /dev/null +++ b/sources/shiboken6/tests/shiboken_test_helper.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + + +def objectFullname(t): + # '__qualname__' for Python 2 does exist for PySide types, only. + name = getattr(t, "__qualname__", t.__name__) + module = t.__module__ + if module is None or module == str.__class__.__module__: + return name + else: + return module + '.' + name |