diff options
Diffstat (limited to 'sources/pyside6/tests/util')
-rw-r--r-- | sources/pyside6/tests/util/color.py | 29 | ||||
-rw-r--r-- | sources/pyside6/tests/util/helper/basicpyslotcase.py | 33 | ||||
-rw-r--r-- | sources/pyside6/tests/util/helper/docmodifier.py | 41 | ||||
-rw-r--r-- | sources/pyside6/tests/util/helper/helper.py | 29 | ||||
-rw-r--r-- | sources/pyside6/tests/util/helper/timedqapplication.py | 32 | ||||
-rw-r--r-- | sources/pyside6/tests/util/helper/timedqguiapplication.py | 27 | ||||
-rw-r--r-- | sources/pyside6/tests/util/helper/usesqapplication.py | 62 | ||||
-rw-r--r-- | sources/pyside6/tests/util/helper/usesqcoreapplication.py | 59 | ||||
-rw-r--r-- | sources/pyside6/tests/util/helper/usesqguiapplication.py | 49 | ||||
-rw-r--r-- | sources/pyside6/tests/util/httpd.py | 29 | ||||
-rw-r--r-- | sources/pyside6/tests/util/processtimer.py | 32 | ||||
-rw-r--r-- | sources/pyside6/tests/util/pyqt_diff.py | 64 | ||||
-rwxr-xr-x | sources/pyside6/tests/util/rename_imports.sh | 30 | ||||
-rw-r--r-- | sources/pyside6/tests/util/test_processtimer.py | 29 |
14 files changed, 86 insertions, 459 deletions
diff --git a/sources/pyside6/tests/util/color.py b/sources/pyside6/tests/util/color.py index aee452ad8..e85be28f3 100644 --- a/sources/pyside6/tests/util/color.py +++ b/sources/pyside6/tests/util/color.py @@ -1,30 +1,5 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 '''Function to print a colored line to terminal''' diff --git a/sources/pyside6/tests/util/helper/basicpyslotcase.py b/sources/pyside6/tests/util/helper/basicpyslotcase.py index 511db8e08..500735c3a 100644 --- a/sources/pyside6/tests/util/helper/basicpyslotcase.py +++ b/sources/pyside6/tests/util/helper/basicpyslotcase.py @@ -1,30 +1,7 @@ -############################################################################# -## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import gc class BasicPySlotCase(object): @@ -40,6 +17,8 @@ class BasicPySlotCase(object): del self.args except: pass + # PYSIDE-535: Need to collect garbage in PyPy to trigger deletion + gc.collect() def cb(self, *args): '''Simple callback with arbitrary arguments. diff --git a/sources/pyside6/tests/util/helper/docmodifier.py b/sources/pyside6/tests/util/helper/docmodifier.py index 5db344f62..cfb665640 100644 --- a/sources/pyside6/tests/util/helper/docmodifier.py +++ b/sources/pyside6/tests/util/helper/docmodifier.py @@ -1,30 +1,5 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 '''Helper metaclass do 'decorate' docstrings from base test case classes''' @@ -108,9 +83,9 @@ if __name__ == '__main__': doc_filter = lambda x: x.startswith('test') doc_suffix = 'suffix' - assert(Implementing.testBase.__doc__ == 'prefixbasesuffix') - assert(Implementing.testWithoutDoc.__doc__ == None) - assert(OnlySuffix.testBase.__doc__ == 'basesuffix') - assert(OnlySuffix.testWithoutDoc.__doc__ == None) - assert(OnlyPrefix.testBase.__doc__ == 'prefixbase') - assert(OnlyPrefix.testWithoutDoc.__doc__ == None) + assert (Implementing.testBase.__doc__ == 'prefixbasesuffix') + assert (Implementing.testWithoutDoc.__doc__ == None) + assert (OnlySuffix.testBase.__doc__ == 'basesuffix') + assert (OnlySuffix.testWithoutDoc.__doc__ == None) + assert (OnlyPrefix.testBase.__doc__ == 'prefixbase') + assert (OnlyPrefix.testWithoutDoc.__doc__ == None) diff --git a/sources/pyside6/tests/util/helper/helper.py b/sources/pyside6/tests/util/helper/helper.py index f500e3fa9..f80753f1f 100644 --- a/sources/pyside6/tests/util/helper/helper.py +++ b/sources/pyside6/tests/util/helper/helper.py @@ -1,30 +1,5 @@ -############################################################################# -## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 '''Helper classes and functions''' diff --git a/sources/pyside6/tests/util/helper/timedqapplication.py b/sources/pyside6/tests/util/helper/timedqapplication.py index f172878ef..d9250a9e0 100644 --- a/sources/pyside6/tests/util/helper/timedqapplication.py +++ b/sources/pyside6/tests/util/helper/timedqapplication.py @@ -1,33 +1,9 @@ -############################################################################# -## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 '''Helper classes and functions''' +import gc import unittest from PySide6.QtCore import QTimer @@ -47,3 +23,5 @@ class TimedQApplication(unittest.TestCase): def tearDown(self): '''Delete resources''' del self.app + # PYSIDE-535: Need to collect garbage in PyPy to trigger deletion + gc.collect() diff --git a/sources/pyside6/tests/util/helper/timedqguiapplication.py b/sources/pyside6/tests/util/helper/timedqguiapplication.py new file mode 100644 index 000000000..3d9a4217c --- /dev/null +++ b/sources/pyside6/tests/util/helper/timedqguiapplication.py @@ -0,0 +1,27 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +'''Helper classes and functions''' + +import gc +import unittest + +from PySide6.QtCore import QTimer +from PySide6.QtGui import QGuiApplication + + +class TimedQGuiApplication(unittest.TestCase): + '''Helper class with timed QGuiApplication exec loop''' + + def setUp(self, timeout=100): + '''Sets up this Application. + + timeout - timeout in millisseconds''' + self.app = QGuiApplication.instance() or QGuiApplication([]) + QTimer.singleShot(timeout, self.app.quit) + + def tearDown(self): + '''Delete resources''' + del self.app + # PYSIDE-535: Need to collect garbage in PyPy to trigger deletion + gc.collect() diff --git a/sources/pyside6/tests/util/helper/usesqapplication.py b/sources/pyside6/tests/util/helper/usesqapplication.py index abb2ca238..f62e320f4 100644 --- a/sources/pyside6/tests/util/helper/usesqapplication.py +++ b/sources/pyside6/tests/util/helper/usesqapplication.py @@ -1,51 +1,43 @@ -############################################################################# -## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 '''Helper classes and functions''' +import gc +import sys import unittest -from PySide6.QtWidgets import QApplication +# This version avoids explicit import in order to adapt to the +# import decision of the main module. +# This should work with every compatible library. +# Replaces the QtGui and QtCore versions as well. class UsesQApplication(unittest.TestCase): - '''Helper class to provide QApplication instances''' - - qapplication = True + '''Helper class to provide Q(Core|Gui|)Application instances + Just connect or call self.exit_app_cb. When called, will ask + self.app to exit. + ''' def setUp(self): '''Creates the QApplication instance''' - + module = sys.modules[sorted(_ for _ in sys.modules + if _.endswith((".QtCore", ".QtGui", ".QtWidgets")))[-1]] + found = module.__name__.rsplit(".")[-1] + cls = getattr(module, {"QtWidgets": "QApplication", + "QtGui": "QGuiApplication", + "QtCore": "QCoreApplication"}[found]) # Simple way of making instance a singleton - super(UsesQApplication, self).setUp() - self.app = QApplication.instance() or QApplication([]) + super().setUp() + self.app = cls.instance() or cls([]) def tearDown(self): '''Deletes the reference owned by self''' del self.app - super(UsesQApplication, self).tearDown() + # PYSIDE-535: Need to collect garbage in PyPy to trigger deletion + gc.collect() + super().tearDown() + + def exit_app_cb(self): + '''Quits the application''' + self.app.exit(0) diff --git a/sources/pyside6/tests/util/helper/usesqcoreapplication.py b/sources/pyside6/tests/util/helper/usesqcoreapplication.py deleted file mode 100644 index 9f4a4280d..000000000 --- a/sources/pyside6/tests/util/helper/usesqcoreapplication.py +++ /dev/null @@ -1,59 +0,0 @@ -############################################################################# -## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -'''Helper classes and functions''' - -import unittest - -from PySide6.QtCore import QCoreApplication - -_core_instance = None - - -class UsesQCoreApplication(unittest.TestCase): - '''Helper class for test cases that require an QCoreApplication - Just connect or call self.exit_app_cb. When called, will ask - self.app to exit. - ''' - - def setUp(self): - '''Set up resources''' - - global _core_instance - if _core_instance is None: - _core_instance = QCoreApplication([]) - - self.app = _core_instance - - def tearDown(self): - '''Release resources''' - del self.app - - def exit_app_cb(self): - '''Quits the application''' - self.app.exit(0) diff --git a/sources/pyside6/tests/util/helper/usesqguiapplication.py b/sources/pyside6/tests/util/helper/usesqguiapplication.py deleted file mode 100644 index 65c4f4939..000000000 --- a/sources/pyside6/tests/util/helper/usesqguiapplication.py +++ /dev/null @@ -1,49 +0,0 @@ -############################################################################# -## -## Copyright (C) 2020 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -'''Helper classes and functions''' - -import unittest - -from PySide6.QtGui import QGuiApplication - - -class UsesQGuiApplication(unittest.TestCase): - '''Helper class to provide QGuiApplication instances''' - - def setUp(self): - '''Creates the QGuiApplication instance''' - - # Simple way of making instance a singleton - super(UsesQGuiApplication, self).setUp() - self.app = QGuiApplication.instance() or QGuiApplication([]) - - def tearDown(self): - '''Deletes the reference owned by self''' - del self.app - super(UsesQGuiApplication, self).tearDown() diff --git a/sources/pyside6/tests/util/httpd.py b/sources/pyside6/tests/util/httpd.py index dbd78aeb8..4e6be4881 100644 --- a/sources/pyside6/tests/util/httpd.py +++ b/sources/pyside6/tests/util/httpd.py @@ -1,30 +1,5 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 import http.server as BaseHTTPServer import os diff --git a/sources/pyside6/tests/util/processtimer.py b/sources/pyside6/tests/util/processtimer.py index 35102e592..e471cf167 100644 --- a/sources/pyside6/tests/util/processtimer.py +++ b/sources/pyside6/tests/util/processtimer.py @@ -1,32 +1,6 @@ #!/usr/bin/env python - -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 import os import time @@ -53,7 +27,7 @@ class ProcessTimer(object): def waitfor(self): time_passed = 0 - while(self.proc.poll() is None and time_passed < self.timeout): + while (self.proc.poll() is None and time_passed < self.timeout): time_passed = time_passed + 1 time.sleep(1) diff --git a/sources/pyside6/tests/util/pyqt_diff.py b/sources/pyside6/tests/util/pyqt_diff.py deleted file mode 100644 index ca10ef049..000000000 --- a/sources/pyside6/tests/util/pyqt_diff.py +++ /dev/null @@ -1,64 +0,0 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# - -'''Script to show the difference between PyQt5 and ours''' - -import sys - -from color import print_colored - - -def check_module_diff(module_name): - '''Difference between PySide6 and PyQt5 versions of qt bindings. - Returns a tuple with the members present only on PySide6 and only on PyQt5''' - shiboken_module = getattr(__import__('PySide6.' + module_name), module_name) - orig_module = getattr(__import__('PyQt5.' + module_name), module_name) - - shiboken_set = set(dir(shiboken_module)) - orig_set = set(dir(orig_module)) - - return sorted(shiboken_set - orig_set), sorted(orig_set - shiboken_set) - - -def main(argv=None): - if argv is None: - argv = sys.argv - - module_name = argv[1] if len(argv) >= 2 else 'QtCore' - - only_shiboken, only_orig = check_module_diff(module_name) - - print_colored('Only on Shiboken version') - print(only_shiboken) - - print_colored('Only on SIP version') - print(only_orig) - - -if __name__ == '__main__': - main() diff --git a/sources/pyside6/tests/util/rename_imports.sh b/sources/pyside6/tests/util/rename_imports.sh index 64b1123ef..1ec900cb3 100755 --- a/sources/pyside6/tests/util/rename_imports.sh +++ b/sources/pyside6/tests/util/rename_imports.sh @@ -1,32 +1,6 @@ #!/bin/bash - -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 # Rename import statements from .py script to use a specific module name set -e diff --git a/sources/pyside6/tests/util/test_processtimer.py b/sources/pyside6/tests/util/test_processtimer.py index 026e14b6b..cee6aa14d 100644 --- a/sources/pyside6/tests/util/test_processtimer.py +++ b/sources/pyside6/tests/util/test_processtimer.py @@ -1,30 +1,5 @@ -############################################################################# -## -## Copyright (C) 2016 The Qt Company Ltd. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the test suite of Qt for Python. -## -## $QT_BEGIN_LICENSE:GPL-EXCEPT$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3 as published by the Free Software -## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 'Tests for processtimer.py' |