diff options
author | Friedemann Kleint <[email protected]> | 2021-04-26 16:28:53 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2021-04-27 15:30:14 +0200 |
commit | 04cc9e12f38aa4dcf2b33524f1775bf2b659ca5f (patch) | |
tree | 655d77d76f099b9641ecc285479023e573e18450 /sources/pyside6/tests/QtWidgets | |
parent | 653f8c8272f3e29c784173ebd98175bc843ee3a4 (diff) |
Tests: Fix star imports
Change-Id: If4e1d64af662b1802f2f748121bda5488a82235a
Reviewed-by: Christian Tismer <[email protected]>
Diffstat (limited to 'sources/pyside6/tests/QtWidgets')
30 files changed, 69 insertions, 50 deletions
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') |