aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/shiboken_test_helper.py
blob: 14fe6a2d17c879be0ead642218ca8f958c8496e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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