From 04cc9e12f38aa4dcf2b33524f1775bf2b659ca5f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 26 Apr 2021 16:28:53 +0200 Subject: Tests: Fix star imports Change-Id: If4e1d64af662b1802f2f748121bda5488a82235a Reviewed-by: Christian Tismer --- sources/pyside6/tests/QtCore/bug_1019.py | 3 ++- sources/pyside6/tests/QtCore/bug_408.py | 3 ++- sources/pyside6/tests/QtCore/bug_656.py | 3 ++- sources/pyside6/tests/QtCore/bug_686.py | 4 +++- sources/pyside6/tests/QtCore/bug_699.py | 3 ++- sources/pyside6/tests/QtCore/bug_706.py | 3 ++- sources/pyside6/tests/QtCore/bug_835.py | 2 +- sources/pyside6/tests/QtCore/bug_938.py | 2 +- sources/pyside6/tests/QtCore/bug_953.py | 3 ++- sources/pyside6/tests/QtCore/bug_PYSIDE-42.py | 2 +- .../pyside6/tests/QtCore/qabstractitemmodel_test.py | 5 ++++- sources/pyside6/tests/QtCore/qanimationgroup_test.py | 3 ++- sources/pyside6/tests/QtCore/qcollator_test.py | 3 ++- .../pyside6/tests/QtCore/qcommandlineparser_test.py | 3 ++- sources/pyside6/tests/QtCore/qdate_test.py | 3 ++- .../pyside6/tests/QtCore/qinstallmsghandler_test.py | 4 +++- sources/pyside6/tests/QtCore/qlinef_test.py | 3 ++- sources/pyside6/tests/QtCore/qmetaobject_test.py | 3 ++- .../tests/QtCore/qmodelindex_internalpointer_test.py | 3 ++- .../tests/QtCore/qobject_connect_notify_test.py | 3 ++- sources/pyside6/tests/QtCore/qobject_parent_test.py | 3 ++- sources/pyside6/tests/QtCore/qprocess_test.py | 3 ++- sources/pyside6/tests/QtGui/bug_652.py | 3 ++- sources/pyside6/tests/QtGui/bug_PYSIDE-344.py | 6 ++++-- sources/pyside6/tests/QtGui/bug_PYSIDE-41.py | 3 +-- sources/pyside6/tests/QtGui/qpixmap_test.py | 5 +++-- .../pyside6/tests/QtNetwork/accessManager_test.py | 6 +++--- sources/pyside6/tests/QtNetwork/bug_446.py | 4 +--- sources/pyside6/tests/QtNetwork/qipv6address_test.py | 3 ++- sources/pyside6/tests/QtPrintSupport/bug_500.py | 4 ++-- sources/pyside6/tests/QtSql/bug_1013.py | 4 ++-- .../tests/QtSql/qsqldatabaseandqueries_test.py | 20 ++++++++++---------- sources/pyside6/tests/QtTest/qvalidator_test.py | 10 +++++----- sources/pyside6/tests/QtUiTools/bug_913.py | 6 +++--- sources/pyside6/tests/QtWidgets/bug_172.py | 3 ++- sources/pyside6/tests/QtWidgets/bug_324.py | 5 +++-- sources/pyside6/tests/QtWidgets/bug_429.py | 4 ++-- sources/pyside6/tests/QtWidgets/bug_430.py | 5 +++-- sources/pyside6/tests/QtWidgets/bug_512.py | 4 ++-- sources/pyside6/tests/QtWidgets/bug_546.py | 3 ++- sources/pyside6/tests/QtWidgets/bug_549.py | 3 ++- sources/pyside6/tests/QtWidgets/bug_569.py | 3 +-- sources/pyside6/tests/QtWidgets/bug_640.py | 2 +- sources/pyside6/tests/QtWidgets/bug_653.py | 4 ++-- sources/pyside6/tests/QtWidgets/bug_668.py | 4 ++-- sources/pyside6/tests/QtWidgets/bug_674.py | 3 +-- sources/pyside6/tests/QtWidgets/bug_675.py | 5 +++-- sources/pyside6/tests/QtWidgets/bug_693.py | 4 ++-- sources/pyside6/tests/QtWidgets/bug_728.py | 5 +++-- sources/pyside6/tests/QtWidgets/bug_736.py | 5 +++-- sources/pyside6/tests/QtWidgets/bug_836.py | 5 +++-- sources/pyside6/tests/QtWidgets/bug_844.py | 5 +++-- sources/pyside6/tests/QtWidgets/bug_862.py | 2 +- sources/pyside6/tests/QtWidgets/bug_941.py | 5 +++-- sources/pyside6/tests/QtWidgets/bug_964.py | 6 +++--- sources/pyside6/tests/QtWidgets/bug_967.py | 3 ++- sources/pyside6/tests/QtWidgets/bug_988.py | 3 ++- .../pyside6/tests/QtWidgets/keep_reference_test.py | 3 ++- .../pyside6/tests/QtWidgets/parent_method_test.py | 3 ++- sources/pyside6/tests/QtWidgets/qapp_test.py | 3 ++- sources/pyside6/tests/QtWidgets/qimage_test.py | 5 +++-- sources/pyside6/tests/QtWidgets/qlayout_test.py | 6 ++++-- sources/pyside6/tests/QtWidgets/qobject_mi_test.py | 5 +++-- sources/pyside6/tests/QtWidgets/qtabwidget_test.py | 3 ++- sources/pyside6/tests/pysidetest/bug_1016.py | 3 ++- .../pyside6/tests/signals/args_dont_match_test.py | 3 ++- sources/pyside6/tests/signals/disconnect_test.py | 2 +- .../pyside6/tests/signals/qobject_receivers_test.py | 3 ++- sources/pyside6/tests/signals/qobject_sender_test.py | 3 ++- .../tests/signals/signal2signal_connect_test.py | 3 ++- .../pyside6/tests/signals/signal_autoconnect_test.py | 5 +++-- .../pyside6/tests/signals/signal_signature_test.py | 3 ++- .../tests/signals/signal_with_primitive_type_test.py | 2 +- 73 files changed, 169 insertions(+), 118 deletions(-) diff --git a/sources/pyside6/tests/QtCore/bug_1019.py b/sources/pyside6/tests/QtCore/bug_1019.py index 349ccb2cb..24fb150b9 100644 --- a/sources/pyside6/tests/QtCore/bug_1019.py +++ b/sources/pyside6/tests/QtCore/bug_1019.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QCoreApplication, QTimer, Slot + class MyTimer (QTimer): def __init__(self): diff --git a/sources/pyside6/tests/QtCore/bug_408.py b/sources/pyside6/tests/QtCore/bug_408.py index 96e1614e9..7dbd5286c 100644 --- a/sources/pyside6/tests/QtCore/bug_408.py +++ b/sources/pyside6/tests/QtCore/bug_408.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QIODevice, QTextStream + class MyDevice(QIODevice): def __init__(self, txt): diff --git a/sources/pyside6/tests/QtCore/bug_656.py b/sources/pyside6/tests/QtCore/bug_656.py index b047875c2..3feaeaeaf 100644 --- a/sources/pyside6/tests/QtCore/bug_656.py +++ b/sources/pyside6/tests/QtCore/bug_656.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util")) from init_paths import init_test_paths init_test_paths() -from PySide6.QtCore import * +from PySide6.QtCore import QCoreApplication + class CoreApp(QCoreApplication): def __init__(self,*args): diff --git a/sources/pyside6/tests/QtCore/bug_686.py b/sources/pyside6/tests/QtCore/bug_686.py index d6394bb90..b5494f7dd 100644 --- a/sources/pyside6/tests/QtCore/bug_686.py +++ b/sources/pyside6/tests/QtCore/bug_686.py @@ -35,7 +35,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import (QMutex, QMutexLocker, QReadLocker, QReadWriteLock, + QThread, QWriteLocker) + class MyWriteThread(QThread): def __init__(self, lock): diff --git a/sources/pyside6/tests/QtCore/bug_699.py b/sources/pyside6/tests/QtCore/bug_699.py index fcba92def..2abfc0819 100644 --- a/sources/pyside6/tests/QtCore/bug_699.py +++ b/sources/pyside6/tests/QtCore/bug_699.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QObject, Property + class TestBug699 (unittest.TestCase): diff --git a/sources/pyside6/tests/QtCore/bug_706.py b/sources/pyside6/tests/QtCore/bug_706.py index 47b25b641..c9c961f57 100644 --- a/sources/pyside6/tests/QtCore/bug_706.py +++ b/sources/pyside6/tests/QtCore/bug_706.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QAbstractListModel, QCoreApplication, QModelIndex + class MyModel (QAbstractListModel): def rowCount(self, parent = None): diff --git a/sources/pyside6/tests/QtCore/bug_835.py b/sources/pyside6/tests/QtCore/bug_835.py index e546cccea..788ead4c9 100644 --- a/sources/pyside6/tests/QtCore/bug_835.py +++ b/sources/pyside6/tests/QtCore/bug_835.py @@ -35,7 +35,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QObject get_counter = 0 diff --git a/sources/pyside6/tests/QtCore/bug_938.py b/sources/pyside6/tests/QtCore/bug_938.py index 2566efada..9965eec95 100644 --- a/sources/pyside6/tests/QtCore/bug_938.py +++ b/sources/pyside6/tests/QtCore/bug_938.py @@ -35,7 +35,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QBuffer class TestBug938 (unittest.TestCase): diff --git a/sources/pyside6/tests/QtCore/bug_953.py b/sources/pyside6/tests/QtCore/bug_953.py index d13c219cd..6a449fac9 100644 --- a/sources/pyside6/tests/QtCore/bug_953.py +++ b/sources/pyside6/tests/QtCore/bug_953.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util")) from init_paths import init_test_paths init_test_paths() -from PySide6.QtCore import * +from PySide6.QtCore import QCoreApplication, QObject, QTimer + class Dispatcher(QObject): _me = None diff --git a/sources/pyside6/tests/QtCore/bug_PYSIDE-42.py b/sources/pyside6/tests/QtCore/bug_PYSIDE-42.py index a64be8e05..b2a79ea81 100644 --- a/sources/pyside6/tests/QtCore/bug_PYSIDE-42.py +++ b/sources/pyside6/tests/QtCore/bug_PYSIDE-42.py @@ -35,7 +35,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QFile, QObject class TestBugPYSIDE42 (unittest.TestCase): diff --git a/sources/pyside6/tests/QtCore/qabstractitemmodel_test.py b/sources/pyside6/tests/QtCore/qabstractitemmodel_test.py index 71d72b10e..ed0873917 100644 --- a/sources/pyside6/tests/QtCore/qabstractitemmodel_test.py +++ b/sources/pyside6/tests/QtCore/qabstractitemmodel_test.py @@ -37,7 +37,10 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import (QAbstractItemModel, QAbstractListModel, + QIdentityProxyModel, QObject, QPersistentModelIndex, + QStringListModel, Qt) + class MyModel (QAbstractListModel): pass diff --git a/sources/pyside6/tests/QtCore/qanimationgroup_test.py b/sources/pyside6/tests/QtCore/qanimationgroup_test.py index 6c07113e0..57def6cb3 100644 --- a/sources/pyside6/tests/QtCore/qanimationgroup_test.py +++ b/sources/pyside6/tests/QtCore/qanimationgroup_test.py @@ -37,7 +37,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QCoreApplication, QParallelAnimationGroup, QSequentialAnimationGroup, QTimer + class QAnimationGroupTest(unittest.TestCase): diff --git a/sources/pyside6/tests/QtCore/qcollator_test.py b/sources/pyside6/tests/QtCore/qcollator_test.py index b67b5ff2c..e5f2958d4 100644 --- a/sources/pyside6/tests/QtCore/qcollator_test.py +++ b/sources/pyside6/tests/QtCore/qcollator_test.py @@ -40,7 +40,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QCollator, QLocale, Qt + class QCollatorTest(unittest.TestCase): def testState(self): diff --git a/sources/pyside6/tests/QtCore/qcommandlineparser_test.py b/sources/pyside6/tests/QtCore/qcommandlineparser_test.py index 0c254f1d7..12250669a 100644 --- a/sources/pyside6/tests/QtCore/qcommandlineparser_test.py +++ b/sources/pyside6/tests/QtCore/qcommandlineparser_test.py @@ -40,7 +40,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QCoreApplication, QCommandLineOption, QCommandLineParser + class QCommandLineParserTest(unittest.TestCase): def testParser(self): diff --git a/sources/pyside6/tests/QtCore/qdate_test.py b/sources/pyside6/tests/QtCore/qdate_test.py index 91f445e83..2946dc9b4 100644 --- a/sources/pyside6/tests/QtCore/qdate_test.py +++ b/sources/pyside6/tests/QtCore/qdate_test.py @@ -39,7 +39,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QDate + class TestQDate (unittest.TestCase): def testGetDate(self): diff --git a/sources/pyside6/tests/QtCore/qinstallmsghandler_test.py b/sources/pyside6/tests/QtCore/qinstallmsghandler_test.py index ca6e5afba..3f8e11a4b 100644 --- a/sources/pyside6/tests/QtCore/qinstallmsghandler_test.py +++ b/sources/pyside6/tests/QtCore/qinstallmsghandler_test.py @@ -37,7 +37,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import (QLibraryInfo, QtCriticalMsg, QtDebugMsg, QtWarningMsg, + qCritical, qDebug, qInstallMessageHandler, qWarning) + param = [] diff --git a/sources/pyside6/tests/QtCore/qlinef_test.py b/sources/pyside6/tests/QtCore/qlinef_test.py index 663310716..cd278f5f9 100644 --- a/sources/pyside6/tests/QtCore/qlinef_test.py +++ b/sources/pyside6/tests/QtCore/qlinef_test.py @@ -39,7 +39,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QLineF, QPointF + class TestQLineF (unittest.TestCase): def testIntersect(self): diff --git a/sources/pyside6/tests/QtCore/qmetaobject_test.py b/sources/pyside6/tests/QtCore/qmetaobject_test.py index e4773afbb..abff32037 100644 --- a/sources/pyside6/tests/QtCore/qmetaobject_test.py +++ b/sources/pyside6/tests/QtCore/qmetaobject_test.py @@ -40,7 +40,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QFile, QObject, QTimer, SIGNAL + class Foo(QFile): pass diff --git a/sources/pyside6/tests/QtCore/qmodelindex_internalpointer_test.py b/sources/pyside6/tests/QtCore/qmodelindex_internalpointer_test.py index 9e7febdf5..953c57c77 100644 --- a/sources/pyside6/tests/QtCore/qmodelindex_internalpointer_test.py +++ b/sources/pyside6/tests/QtCore/qmodelindex_internalpointer_test.py @@ -39,7 +39,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QAbstractListModel, QObject + class MyModel (QAbstractListModel): pass diff --git a/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py b/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py index 714c47189..c46c41b2a 100644 --- a/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py +++ b/sources/pyside6/tests/QtCore/qobject_connect_notify_test.py @@ -39,9 +39,10 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QObject, SIGNAL, SLOT from helper.usesqcoreapplication import UsesQCoreApplication + def cute_slot(): pass diff --git a/sources/pyside6/tests/QtCore/qobject_parent_test.py b/sources/pyside6/tests/QtCore/qobject_parent_test.py index 941766acf..3edd866cc 100644 --- a/sources/pyside6/tests/QtCore/qobject_parent_test.py +++ b/sources/pyside6/tests/QtCore/qobject_parent_test.py @@ -38,7 +38,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QObject, QRegularExpression, QTimer + class ParentRefCountCase(unittest.TestCase): '''Test case for the refcount changes of setParent''' diff --git a/sources/pyside6/tests/QtCore/qprocess_test.py b/sources/pyside6/tests/QtCore/qprocess_test.py index 691e2befc..9e9ca348f 100644 --- a/sources/pyside6/tests/QtCore/qprocess_test.py +++ b/sources/pyside6/tests/QtCore/qprocess_test.py @@ -39,7 +39,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QProcess + class TestQProcess (unittest.TestCase): def testStartDetached(self): diff --git a/sources/pyside6/tests/QtGui/bug_652.py b/sources/pyside6/tests/QtGui/bug_652.py index 50aa7e7c7..a994e8997 100644 --- a/sources/pyside6/tests/QtGui/bug_652.py +++ b/sources/pyside6/tests/QtGui/bug_652.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtGui import * +from PySide6.QtGui import QTextBlockUserData, QTextCursor, QTextDocument + class MyData(QTextBlockUserData): def __init__(self, data): diff --git a/sources/pyside6/tests/QtGui/bug_PYSIDE-344.py b/sources/pyside6/tests/QtGui/bug_PYSIDE-344.py index ce937c9a9..f221aebd4 100644 --- a/sources/pyside6/tests/QtGui/bug_PYSIDE-344.py +++ b/sources/pyside6/tests/QtGui/bug_PYSIDE-344.py @@ -39,8 +39,10 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtGui import * +from PySide6.QtCore import QMargins, QPoint, QPointF, QSize, QSizeF +from PySide6.QtGui import (QMatrix4x4, QQuaternion, QTransform, QVector2D, + QVector3D, QVector4D) + def testList(): return [QPoint(10, 10), QPointF(1, 1), QSize(10, 10), QSizeF(1, 1), diff --git a/sources/pyside6/tests/QtGui/bug_PYSIDE-41.py b/sources/pyside6/tests/QtGui/bug_PYSIDE-41.py index fff11779d..d7aea57bf 100644 --- a/sources/pyside6/tests/QtGui/bug_PYSIDE-41.py +++ b/sources/pyside6/tests/QtGui/bug_PYSIDE-41.py @@ -39,8 +39,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtGui import * +from PySide6.QtCore import QPersistentModelIndex, QStringListModel class TestBugPYSIDE41(unittest.TestCase): diff --git a/sources/pyside6/tests/QtGui/qpixmap_test.py b/sources/pyside6/tests/QtGui/qpixmap_test.py index 496bed5dc..9da7044f9 100644 --- a/sources/pyside6/tests/QtGui/qpixmap_test.py +++ b/sources/pyside6/tests/QtGui/qpixmap_test.py @@ -36,8 +36,9 @@ from init_paths import init_test_paths init_test_paths(False) from helper.usesqapplication import UsesQApplication -from PySide6.QtGui import * -from PySide6.QtCore import * +from PySide6.QtGui import QColor, QPixmap +from PySide6.QtCore import QFile, QIODevice, QObject, QSize, Qt + class QPixmapTest(UsesQApplication): def testQVariantConstructor(self): diff --git a/sources/pyside6/tests/QtNetwork/accessManager_test.py b/sources/pyside6/tests/QtNetwork/accessManager_test.py index c2e02f673..c7bf00c43 100644 --- a/sources/pyside6/tests/QtNetwork/accessManager_test.py +++ b/sources/pyside6/tests/QtNetwork/accessManager_test.py @@ -37,12 +37,12 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtNetwork import * - +from PySide6.QtCore import QUrl +from PySide6.QtNetwork import QNetworkAccessManager, QNetworkReply, QNetworkRequest from helper.usesqcoreapplication import UsesQCoreApplication from httpd import TestServer + class AccessManagerCase(UsesQCoreApplication): def setUp(self): diff --git a/sources/pyside6/tests/QtNetwork/bug_446.py b/sources/pyside6/tests/QtNetwork/bug_446.py index d2f7fd28d..7f075c2a3 100644 --- a/sources/pyside6/tests/QtNetwork/bug_446.py +++ b/sources/pyside6/tests/QtNetwork/bug_446.py @@ -35,9 +35,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtNetwork import * - +from PySide6.QtNetwork import QHostAddress, QTcpServer, QTcpSocket from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside6/tests/QtNetwork/qipv6address_test.py b/sources/pyside6/tests/QtNetwork/qipv6address_test.py index b23122b92..10931dcc2 100644 --- a/sources/pyside6/tests/QtNetwork/qipv6address_test.py +++ b/sources/pyside6/tests/QtNetwork/qipv6address_test.py @@ -37,7 +37,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtNetwork import * +from PySide6.QtNetwork import QIPv6Address + class QIPv6AddressGetItemTest(unittest.TestCase): def testLength(self): diff --git a/sources/pyside6/tests/QtPrintSupport/bug_500.py b/sources/pyside6/tests/QtPrintSupport/bug_500.py index 4cf6014a5..51297d659 100644 --- a/sources/pyside6/tests/QtPrintSupport/bug_500.py +++ b/sources/pyside6/tests/QtPrintSupport/bug_500.py @@ -37,10 +37,10 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtPrintSupport import * +from PySide6.QtPrintSupport import QPrintDialog from helper.usesqapplication import UsesQApplication + class NeverDiesTest(UsesQApplication): def testIt(self): diff --git a/sources/pyside6/tests/QtSql/bug_1013.py b/sources/pyside6/tests/QtSql/bug_1013.py index b07baa033..50cdce867 100644 --- a/sources/pyside6/tests/QtSql/bug_1013.py +++ b/sources/pyside6/tests/QtSql/bug_1013.py @@ -35,8 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtSql import * +from PySide6.QtCore import QCoreApplication, QTimer +from PySide6.QtSql import QSqlDatabase, QSqlQuery, QSqlTableModel class TestBug1013 (unittest.TestCase): diff --git a/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py b/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py index 3123e027d..54696c687 100644 --- a/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py +++ b/sources/pyside6/tests/QtSql/qsqldatabaseandqueries_test.py @@ -40,42 +40,42 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6 import QtSql -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtSql import QSqlDatabase, QSqlQuery, QSqlTableModel +from PySide6.QtWidgets import QApplication, QWidget + class Foo(QWidget): def __init__(self): QWidget.__init__(self) - self.model = QtSql.QSqlTableModel() + self.model = QSqlTableModel() class SqlDatabaseCreationDestructionAndQueries(unittest.TestCase): '''Test cases for QtSql database creation, destruction and queries''' def setUp(self): #Acquire resources - self.assertFalse(not QtSql.QSqlDatabase.drivers(), "installed Qt has no DB drivers") - self.assertTrue("QSQLITE" in QtSql.QSqlDatabase.drivers(), "\"QSQLITE\" driver not available in this Qt version") - self.db = QtSql.QSqlDatabase.addDatabase("QSQLITE") + self.assertFalse(not QSqlDatabase.drivers(), "installed Qt has no DB drivers") + self.assertTrue("QSQLITE" in QSqlDatabase.drivers(), "\"QSQLITE\" driver not available in this Qt version") + self.db = QSqlDatabase.addDatabase("QSQLITE") self.db.setDatabaseName(":memory:") self.assertTrue(self.db.open()) def tearDown(self): #Release resources self.db.close() - QtSql.QSqlDatabase.removeDatabase(":memory:") + QSqlDatabase.removeDatabase(":memory:") del self.db def testTableCreationAndDestruction(self): #Test table creation and destruction - query = QtSql.QSqlQuery() + query = QSqlQuery() query.exec_("CREATE TABLE dummy(id int primary key, dummyfield varchar(20))") query.exec_("DROP TABLE dummy") query.clear() def testTableInsertionAndRetrieval(self): #Test table creation, insertion and retrieval - query = QtSql.QSqlQuery() + query = QSqlQuery() query.exec_("CREATE TABLE person(id int primary key, " "firstname varchar(20), lastname varchar(20))") query.exec_("INSERT INTO person VALUES(101, 'George', 'Harrison')") diff --git a/sources/pyside6/tests/QtTest/qvalidator_test.py b/sources/pyside6/tests/QtTest/qvalidator_test.py index 0f69e38d6..eb3ab58d9 100644 --- a/sources/pyside6/tests/QtTest/qvalidator_test.py +++ b/sources/pyside6/tests/QtTest/qvalidator_test.py @@ -35,13 +35,13 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtGui import * -from PySide6.QtWidgets import * -from PySide6.QtTest import * - +from PySide6.QtCore import QTimer, Qt +from PySide6.QtGui import QValidator +from PySide6.QtWidgets import QLineEdit +from PySide6.QtTest import QTest from helper.usesqapplication import UsesQApplication + class MyValidator1(QValidator): def fixup(self, input): return "fixed" diff --git a/sources/pyside6/tests/QtUiTools/bug_913.py b/sources/pyside6/tests/QtUiTools/bug_913.py index 69012e165..20c3555ac 100644 --- a/sources/pyside6/tests/QtUiTools/bug_913.py +++ b/sources/pyside6/tests/QtUiTools/bug_913.py @@ -38,9 +38,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtWidgets import * -from PySide6.QtUiTools import * +from PySide6.QtWidgets import QApplication +from PySide6.QtUiTools import QUiLoader + class TestBug913 (unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_172.py b/sources/pyside6/tests/QtWidgets/bug_172.py index 683abd76c..49df6c4e9 100644 --- a/sources/pyside6/tests/QtWidgets/bug_172.py +++ b/sources/pyside6/tests/QtWidgets/bug_172.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util")) from init_paths import init_test_paths init_test_paths() -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QApplication, QHBoxLayout, QVBoxLayout, QWidget + if __name__ == '__main__': app = QApplication([]) diff --git a/sources/pyside6/tests/QtWidgets/bug_324.py b/sources/pyside6/tests/QtWidgets/bug_324.py index 4b312e9e3..2f59b6c23 100644 --- a/sources/pyside6/tests/QtWidgets/bug_324.py +++ b/sources/pyside6/tests/QtWidgets/bug_324.py @@ -37,8 +37,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import QObject, Signal +from PySide6.QtWidgets import QApplication + class QBug( QObject ): def __init__(self, parent = None): diff --git a/sources/pyside6/tests/QtWidgets/bug_429.py b/sources/pyside6/tests/QtWidgets/bug_429.py index a461ee320..5a004e742 100644 --- a/sources/pyside6/tests/QtWidgets/bug_429.py +++ b/sources/pyside6/tests/QtWidgets/bug_429.py @@ -35,8 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util")) from init_paths import init_test_paths init_test_paths() -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import QTimer +from PySide6.QtWidgets import QApplication, QGraphicsScene, QLabel app = QApplication(sys.argv) diff --git a/sources/pyside6/tests/QtWidgets/bug_430.py b/sources/pyside6/tests/QtWidgets/bug_430.py index 1d124c7c4..7eecd650d 100644 --- a/sources/pyside6/tests/QtWidgets/bug_430.py +++ b/sources/pyside6/tests/QtWidgets/bug_430.py @@ -35,8 +35,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util")) from init_paths import init_test_paths init_test_paths() -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import QAbstractListModel, QModelIndex, QTimer +from PySide6.QtWidgets import QApplication, QListView + class ListModel(QAbstractListModel): def rowCount(self, parent = QModelIndex()): diff --git a/sources/pyside6/tests/QtWidgets/bug_512.py b/sources/pyside6/tests/QtWidgets/bug_512.py index 125333327..46dadfa57 100644 --- a/sources/pyside6/tests/QtWidgets/bug_512.py +++ b/sources/pyside6/tests/QtWidgets/bug_512.py @@ -38,8 +38,8 @@ from init_paths import init_test_paths init_test_paths(False) from helper.usesqapplication import UsesQApplication -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QGridLayout, QLabel, QWidget + class BugTest(UsesQApplication): def testCase(self): diff --git a/sources/pyside6/tests/QtWidgets/bug_546.py b/sources/pyside6/tests/QtWidgets/bug_546.py index 5f1f314c0..9fece8cd4 100644 --- a/sources/pyside6/tests/QtWidgets/bug_546.py +++ b/sources/pyside6/tests/QtWidgets/bug_546.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QApplication, QCompleter, QPlainTextEdit + class TestBug546(unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_549.py b/sources/pyside6/tests/QtWidgets/bug_549.py index ad12d2fc0..dee5d8315 100644 --- a/sources/pyside6/tests/QtWidgets/bug_549.py +++ b/sources/pyside6/tests/QtWidgets/bug_549.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QApplication, QGraphicsWidget + class TestBug549(unittest.TestCase): def testBug(self): diff --git a/sources/pyside6/tests/QtWidgets/bug_569.py b/sources/pyside6/tests/QtWidgets/bug_569.py index 0c7a7b58a..12809853b 100644 --- a/sources/pyside6/tests/QtWidgets/bug_569.py +++ b/sources/pyside6/tests/QtWidgets/bug_569.py @@ -35,8 +35,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QTableWidgetItem, QListWidgetItem, QTreeWidgetItem class TestBug569(unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_640.py b/sources/pyside6/tests/QtWidgets/bug_640.py index 4c1fe14f2..965adc3a5 100644 --- a/sources/pyside6/tests/QtWidgets/bug_640.py +++ b/sources/pyside6/tests/QtWidgets/bug_640.py @@ -35,7 +35,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QStyleOptionGraphicsItem class Bug640(unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_653.py b/sources/pyside6/tests/QtWidgets/bug_653.py index 7d61612e4..47d310a44 100644 --- a/sources/pyside6/tests/QtWidgets/bug_653.py +++ b/sources/pyside6/tests/QtWidgets/bug_653.py @@ -35,8 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QApplication, QWizard, QWizardPage + class TestBug653(unittest.TestCase): """Crash after calling QWizardPage.wizard()""" diff --git a/sources/pyside6/tests/QtWidgets/bug_668.py b/sources/pyside6/tests/QtWidgets/bug_668.py index 39744e2c0..8b03ebbdb 100644 --- a/sources/pyside6/tests/QtWidgets/bug_668.py +++ b/sources/pyside6/tests/QtWidgets/bug_668.py @@ -37,8 +37,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util")) from init_paths import init_test_paths init_test_paths() -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import QDir, QModelIndex, QTimer +from PySide6.QtWidgets import QApplication, QFileSystemModel, QMainWindow, QTreeView class A(QMainWindow): diff --git a/sources/pyside6/tests/QtWidgets/bug_674.py b/sources/pyside6/tests/QtWidgets/bug_674.py index d24cca1c2..94ae27212 100644 --- a/sources/pyside6/tests/QtWidgets/bug_674.py +++ b/sources/pyside6/tests/QtWidgets/bug_674.py @@ -35,8 +35,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QApplication, QGraphicsScene class TestBug679(unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_675.py b/sources/pyside6/tests/QtWidgets/bug_675.py index bdbd20197..dfe8e7437 100644 --- a/sources/pyside6/tests/QtWidgets/bug_675.py +++ b/sources/pyside6/tests/QtWidgets/bug_675.py @@ -35,8 +35,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util")) from init_paths import init_test_paths init_test_paths() -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtWidgets import (QApplication, QGraphicsLinearLayout, + QGraphicsScene, QGraphicsView, QTextEdit) + app = QApplication([]) diff --git a/sources/pyside6/tests/QtWidgets/bug_693.py b/sources/pyside6/tests/QtWidgets/bug_693.py index 4d687509c..9f5b0f068 100644 --- a/sources/pyside6/tests/QtWidgets/bug_693.py +++ b/sources/pyside6/tests/QtWidgets/bug_693.py @@ -35,8 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import QAbstractListModel, QLine +from PySide6.QtWidgets import QApplication, QListView class MyModel (QAbstractListModel): diff --git a/sources/pyside6/tests/QtWidgets/bug_728.py b/sources/pyside6/tests/QtWidgets/bug_728.py index 69b4da643..9e1473635 100644 --- a/sources/pyside6/tests/QtWidgets/bug_728.py +++ b/sources/pyside6/tests/QtWidgets/bug_728.py @@ -35,8 +35,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util")) from init_paths import init_test_paths init_test_paths() -from PySide6.QtWidgets import * -from PySide6.QtCore import * +from PySide6.QtWidgets import QApplication, QDialog, QFileDialog +from PySide6.QtCore import QDir, QTimer + # Periodically check for the file dialog to appear and close it dialog = None diff --git a/sources/pyside6/tests/QtWidgets/bug_736.py b/sources/pyside6/tests/QtWidgets/bug_736.py index 44652ced9..61ec3f9da 100644 --- a/sources/pyside6/tests/QtWidgets/bug_736.py +++ b/sources/pyside6/tests/QtWidgets/bug_736.py @@ -34,8 +34,9 @@ from pathlib import Path sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import Qt +from PySide6.QtWidgets import QApplication, QSlider + class TestBug736 (unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_836.py b/sources/pyside6/tests/QtWidgets/bug_836.py index 34ca0b608..f985e4615 100644 --- a/sources/pyside6/tests/QtWidgets/bug_836.py +++ b/sources/pyside6/tests/QtWidgets/bug_836.py @@ -35,8 +35,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1] / "util")) from init_paths import init_test_paths init_test_paths() -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import QTimer +from PySide6.QtWidgets import QApplication, QFrame + class Mixin1(object): pass diff --git a/sources/pyside6/tests/QtWidgets/bug_844.py b/sources/pyside6/tests/QtWidgets/bug_844.py index 4b98cf155..1c7705939 100644 --- a/sources/pyside6/tests/QtWidgets/bug_844.py +++ b/sources/pyside6/tests/QtWidgets/bug_844.py @@ -34,8 +34,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths() -from PySide6.QtWidgets import * -from PySide6.QtCore import * +from PySide6.QtWidgets import QApplication, QLabel +from PySide6.QtCore import QObject, QTimer + class QtKeyPressListener(QObject): def __init__(self, obj): diff --git a/sources/pyside6/tests/QtWidgets/bug_862.py b/sources/pyside6/tests/QtWidgets/bug_862.py index 997f212e7..f788cb12d 100644 --- a/sources/pyside6/tests/QtWidgets/bug_862.py +++ b/sources/pyside6/tests/QtWidgets/bug_862.py @@ -58,7 +58,7 @@ from init_paths import init_test_paths init_test_paths(False) from PySide6.QtCore import QObject -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QApplication, QGraphicsItem, QGraphicsWidget, QGraphicsObject, QWidget import PySide6.QtCore diff --git a/sources/pyside6/tests/QtWidgets/bug_941.py b/sources/pyside6/tests/QtWidgets/bug_941.py index 004730cfd..459659931 100644 --- a/sources/pyside6/tests/QtWidgets/bug_941.py +++ b/sources/pyside6/tests/QtWidgets/bug_941.py @@ -35,8 +35,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import Qt +from PySide6.QtWidgets import QApplication, QHeaderView + def foo(a, b): pass diff --git a/sources/pyside6/tests/QtWidgets/bug_964.py b/sources/pyside6/tests/QtWidgets/bug_964.py index 905f92ad6..8a3ea9434 100644 --- a/sources/pyside6/tests/QtWidgets/bug_964.py +++ b/sources/pyside6/tests/QtWidgets/bug_964.py @@ -35,9 +35,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtGui import * -from PySide6.QtWidgets import * +from PySide6.QtCore import QStringListModel, Qt +from PySide6.QtWidgets import QAbstractItemView, QApplication, QListView + class TestBug964 (unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_967.py b/sources/pyside6/tests/QtWidgets/bug_967.py index e39aac1ba..b86715002 100644 --- a/sources/pyside6/tests/QtWidgets/bug_967.py +++ b/sources/pyside6/tests/QtWidgets/bug_967.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QApplication, QComboBox + class TestBug967 (unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/bug_988.py b/sources/pyside6/tests/QtWidgets/bug_988.py index 710891680..9d3f0398d 100644 --- a/sources/pyside6/tests/QtWidgets/bug_988.py +++ b/sources/pyside6/tests/QtWidgets/bug_988.py @@ -35,7 +35,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QApplication, QTabWidget + class TestBug988 (unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/keep_reference_test.py b/sources/pyside6/tests/QtWidgets/keep_reference_test.py index 5c7c0d48f..87ab45ec4 100644 --- a/sources/pyside6/tests/QtWidgets/keep_reference_test.py +++ b/sources/pyside6/tests/QtWidgets/keep_reference_test.py @@ -39,9 +39,10 @@ init_test_paths(False) from sys import getrefcount from helper.usesqapplication import UsesQApplication -from PySide6.QtCore import * +from PySide6.QtCore import QAbstractTableModel from PySide6.QtWidgets import QTableView + class TestModel(QAbstractTableModel): def __init__(self, parent=None): QAbstractTableModel.__init__(self, parent) diff --git a/sources/pyside6/tests/QtWidgets/parent_method_test.py b/sources/pyside6/tests/QtWidgets/parent_method_test.py index 29e4d1db3..56b109531 100644 --- a/sources/pyside6/tests/QtWidgets/parent_method_test.py +++ b/sources/pyside6/tests/QtWidgets/parent_method_test.py @@ -36,7 +36,8 @@ from init_paths import init_test_paths init_test_paths(False) from PySide6.QtCore import QObject, QTimer, QThread -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QTableView, QWidget + class Foo(QTableView): def __init__(self, parent=None): diff --git a/sources/pyside6/tests/QtWidgets/qapp_test.py b/sources/pyside6/tests/QtWidgets/qapp_test.py index cc5d1ea0d..0455cdb61 100644 --- a/sources/pyside6/tests/QtWidgets/qapp_test.py +++ b/sources/pyside6/tests/QtWidgets/qapp_test.py @@ -37,7 +37,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QApplication + class QAppPresence(unittest.TestCase): diff --git a/sources/pyside6/tests/QtWidgets/qimage_test.py b/sources/pyside6/tests/QtWidgets/qimage_test.py index 38b71a7af..73c8ba4ce 100644 --- a/sources/pyside6/tests/QtWidgets/qimage_test.py +++ b/sources/pyside6/tests/QtWidgets/qimage_test.py @@ -37,10 +37,11 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtGui import * -from PySide6.QtWidgets import * +from PySide6.QtGui import QImage +from PySide6.QtWidgets import QLabel from helper.usesqapplication import UsesQApplication + xpm = [ "27 22 206 2", " c None", diff --git a/sources/pyside6/tests/QtWidgets/qlayout_test.py b/sources/pyside6/tests/QtWidgets/qlayout_test.py index 7b9bc549a..012d84da1 100644 --- a/sources/pyside6/tests/QtWidgets/qlayout_test.py +++ b/sources/pyside6/tests/QtWidgets/qlayout_test.py @@ -36,8 +36,10 @@ from init_paths import init_test_paths init_test_paths(False) from helper.usesqapplication import UsesQApplication -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import QTimer +from PySide6.QtWidgets import (QFormLayout, QHBoxLayout, QLayout, QPushButton, + QSpacerItem, QWidget, QWidgetItem) + class MyLayout(QLayout): def __init__(self, parent=None): diff --git a/sources/pyside6/tests/QtWidgets/qobject_mi_test.py b/sources/pyside6/tests/QtWidgets/qobject_mi_test.py index 6ed39e8f5..6251f757c 100644 --- a/sources/pyside6/tests/QtWidgets/qobject_mi_test.py +++ b/sources/pyside6/tests/QtWidgets/qobject_mi_test.py @@ -40,11 +40,12 @@ from init_paths import init_test_paths init_test_paths(False) from PySide6.QtCore import QObject -from PySide6.QtGui import * -from PySide6.QtWidgets import * +from PySide6.QtGui import QIntValidator, QValidator +from PySide6.QtWidgets import QWidget from helper.usesqapplication import UsesQApplication + class WidgetValidator(QWidget, QIntValidator): def __init__(self, parent=None): QWidget.__init__(self, parent) diff --git a/sources/pyside6/tests/QtWidgets/qtabwidget_test.py b/sources/pyside6/tests/QtWidgets/qtabwidget_test.py index 6e0038ee6..a302dabfe 100644 --- a/sources/pyside6/tests/QtWidgets/qtabwidget_test.py +++ b/sources/pyside6/tests/QtWidgets/qtabwidget_test.py @@ -35,9 +35,10 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtWidgets import * +from PySide6.QtWidgets import QPushButton, QTabWidget from helper.timedqapplication import TimedQApplication + def makeBug643(tab): button = QPushButton('Foo') tab.insertTab(0, button, 'Foo') diff --git a/sources/pyside6/tests/pysidetest/bug_1016.py b/sources/pyside6/tests/pysidetest/bug_1016.py index 42ca55e71..54a155fea 100644 --- a/sources/pyside6/tests/pysidetest/bug_1016.py +++ b/sources/pyside6/tests/pysidetest/bug_1016.py @@ -36,7 +36,8 @@ from init_paths import init_test_paths init_test_paths(True) import shiboken6 -from testbinding import * +from testbinding import getHiddenObject + class TestBug1016 (unittest.TestCase): diff --git a/sources/pyside6/tests/signals/args_dont_match_test.py b/sources/pyside6/tests/signals/args_dont_match_test.py index 42ca492a8..78b081d3e 100644 --- a/sources/pyside6/tests/signals/args_dont_match_test.py +++ b/sources/pyside6/tests/signals/args_dont_match_test.py @@ -37,7 +37,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QObject, SIGNAL + class ArgsDontMatch(unittest.TestCase): diff --git a/sources/pyside6/tests/signals/disconnect_test.py b/sources/pyside6/tests/signals/disconnect_test.py index 5eaf6fad7..281bc5c66 100644 --- a/sources/pyside6/tests/signals/disconnect_test.py +++ b/sources/pyside6/tests/signals/disconnect_test.py @@ -35,7 +35,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(True) -from PySide6.QtCore import * +from PySide6.QtCore import QObject, Signal from testbinding import TestObject diff --git a/sources/pyside6/tests/signals/qobject_receivers_test.py b/sources/pyside6/tests/signals/qobject_receivers_test.py index 4b6ae021e..920cd2264 100644 --- a/sources/pyside6/tests/signals/qobject_receivers_test.py +++ b/sources/pyside6/tests/signals/qobject_receivers_test.py @@ -39,7 +39,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QObject, SIGNAL, SLOT + def cute_slot(): pass diff --git a/sources/pyside6/tests/signals/qobject_sender_test.py b/sources/pyside6/tests/signals/qobject_sender_test.py index 5aff3248a..d8ceb55f8 100644 --- a/sources/pyside6/tests/signals/qobject_sender_test.py +++ b/sources/pyside6/tests/signals/qobject_sender_test.py @@ -40,9 +40,10 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QCoreApplication, QObject, QTimer, SIGNAL from helper.usesqcoreapplication import UsesQCoreApplication + class ExtQTimer(QTimer): def __init__(self): QTimer.__init__(self) diff --git a/sources/pyside6/tests/signals/signal2signal_connect_test.py b/sources/pyside6/tests/signals/signal2signal_connect_test.py index 1a0e67aaf..41a507fe5 100644 --- a/sources/pyside6/tests/signals/signal2signal_connect_test.py +++ b/sources/pyside6/tests/signals/signal2signal_connect_test.py @@ -39,7 +39,8 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QObject, SIGNAL + def cute_slot(): pass diff --git a/sources/pyside6/tests/signals/signal_autoconnect_test.py b/sources/pyside6/tests/signals/signal_autoconnect_test.py index 864f3ead5..3f12c8994 100644 --- a/sources/pyside6/tests/signals/signal_autoconnect_test.py +++ b/sources/pyside6/tests/signals/signal_autoconnect_test.py @@ -37,8 +37,9 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * -from PySide6.QtWidgets import * +from PySide6.QtCore import QMetaObject, Slot +from PySide6.QtWidgets import QApplication, QPushButton, QWidget + class MyObject(QWidget): def __init__(self, parent=None): diff --git a/sources/pyside6/tests/signals/signal_signature_test.py b/sources/pyside6/tests/signals/signal_signature_test.py index 0e05494a1..235488d83 100644 --- a/sources/pyside6/tests/signals/signal_signature_test.py +++ b/sources/pyside6/tests/signals/signal_signature_test.py @@ -39,9 +39,10 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QObject, Signal, SIGNAL, SLOT from helper.usesqcoreapplication import UsesQCoreApplication + called = False name = "Old" class Obj(QObject): diff --git a/sources/pyside6/tests/signals/signal_with_primitive_type_test.py b/sources/pyside6/tests/signals/signal_with_primitive_type_test.py index 6afb762f6..993386985 100644 --- a/sources/pyside6/tests/signals/signal_with_primitive_type_test.py +++ b/sources/pyside6/tests/signals/signal_with_primitive_type_test.py @@ -37,7 +37,7 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6.QtCore import * +from PySide6.QtCore import QCoreApplication, QObject, QTimeLine, SIGNAL class SignalPrimitiveTypeTest(unittest.TestCase): -- cgit v1.2.3