diff options
Diffstat (limited to 'sources/pyside2/tests/QtCore')
135 files changed, 758 insertions, 68 deletions
diff --git a/sources/pyside2/tests/QtCore/attr_cache_py3k.py b/sources/pyside2/tests/QtCore/attr_cache_py3k.py index f9761a9d3..558fe0e2b 100644 --- a/sources/pyside2/tests/QtCore/attr_cache_py3k.py +++ b/sources/pyside2/tests/QtCore/attr_cache_py3k.py @@ -46,6 +46,14 @@ This is the original code from the bug report https://bugreports.qt.io/browse/PYSIDE-60 ''' +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths() + from PySide2.QtCore import QObject diff --git a/sources/pyside2/tests/QtCore/blocking_signals_test.py b/sources/pyside2/tests/QtCore/blocking_signals_test.py index 2f8b95b27..c3497c89f 100644 --- a/sources/pyside2/tests/QtCore/blocking_signals_test.py +++ b/sources/pyside2/tests/QtCore/blocking_signals_test.py @@ -28,9 +28,14 @@ ''' Test case for QObject.signalsBlocked() and blockSignal()''' -import unittest import os +import sys from tempfile import mkstemp +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, SIGNAL, QFile, QSignalBlocker diff --git a/sources/pyside2/tests/QtCore/bug_1019.py b/sources/pyside2/tests/QtCore/bug_1019.py index bc4b9b679..404e71bfc 100644 --- a/sources/pyside2/tests/QtCore/bug_1019.py +++ b/sources/pyside2/tests/QtCore/bug_1019.py @@ -26,7 +26,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class MyTimer (QTimer): diff --git a/sources/pyside2/tests/QtCore/bug_1031.py b/sources/pyside2/tests/QtCore/bug_1031.py index 1fb0d6ebd..6a7f248cc 100644 --- a/sources/pyside2/tests/QtCore/bug_1031.py +++ b/sources/pyside2/tests/QtCore/bug_1031.py @@ -26,6 +26,14 @@ ## ############################################################################# +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths() + from PySide2.QtCore import QStateMachine, QState mach = QStateMachine() diff --git a/sources/pyside2/tests/QtCore/bug_1063.py b/sources/pyside2/tests/QtCore/bug_1063.py index 1daaaa4dd..73291bffc 100644 --- a/sources/pyside2/tests/QtCore/bug_1063.py +++ b/sources/pyside2/tests/QtCore/bug_1063.py @@ -33,7 +33,9 @@ import sys import tempfile import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2 import QtCore import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/bug_1069.py b/sources/pyside2/tests/QtCore/bug_1069.py index d784062e3..690553e72 100644 --- a/sources/pyside2/tests/QtCore/bug_1069.py +++ b/sources/pyside2/tests/QtCore/bug_1069.py @@ -28,9 +28,17 @@ ''' unit test for BUG #1069 ''' -from PySide2 import QtCore +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + +from PySide2 import QtCore + + class QDataStreamOpOverloadTestCase(unittest.TestCase): def setUp(self): self.ba = QtCore.QByteArray() diff --git a/sources/pyside2/tests/QtCore/bug_278_test.py b/sources/pyside2/tests/QtCore/bug_278_test.py index e0f07d119..cc99136e7 100644 --- a/sources/pyside2/tests/QtCore/bug_278_test.py +++ b/sources/pyside2/tests/QtCore/bug_278_test.py @@ -28,8 +28,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2 import QtCore def setValue(o): diff --git a/sources/pyside2/tests/QtCore/bug_332.py b/sources/pyside2/tests/QtCore/bug_332.py index 662a0f632..f49845cf9 100644 --- a/sources/pyside2/tests/QtCore/bug_332.py +++ b/sources/pyside2/tests/QtCore/bug_332.py @@ -28,7 +28,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2 import QtCore class Lock(QtCore.QMutex): diff --git a/sources/pyside2/tests/QtCore/bug_408.py b/sources/pyside2/tests/QtCore/bug_408.py index b2f97df69..bdb7c1af5 100644 --- a/sources/pyside2/tests/QtCore/bug_408.py +++ b/sources/pyside2/tests/QtCore/bug_408.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class MyDevice(QIODevice): diff --git a/sources/pyside2/tests/QtCore/bug_428.py b/sources/pyside2/tests/QtCore/bug_428.py index d1504876b..b4c8f9632 100644 --- a/sources/pyside2/tests/QtCore/bug_428.py +++ b/sources/pyside2/tests/QtCore/bug_428.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject class MyBaseObject(QObject): diff --git a/sources/pyside2/tests/QtCore/bug_462.py b/sources/pyside2/tests/QtCore/bug_462.py index 5186ac759..e929be0af 100644 --- a/sources/pyside2/tests/QtCore/bug_462.py +++ b/sources/pyside2/tests/QtCore/bug_462.py @@ -26,8 +26,13 @@ ## ############################################################################# -import unittest +import os import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, QCoreApplication, QEvent, QThread diff --git a/sources/pyside2/tests/QtCore/bug_505.py b/sources/pyside2/tests/QtCore/bug_505.py index c1d434c7f..4db6b801d 100644 --- a/sources/pyside2/tests/QtCore/bug_505.py +++ b/sources/pyside2/tests/QtCore/bug_505.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject class MyBaseObject(QObject): diff --git a/sources/pyside2/tests/QtCore/bug_515.py b/sources/pyside2/tests/QtCore/bug_515.py index d4ca3f463..a96a8c193 100644 --- a/sources/pyside2/tests/QtCore/bug_515.py +++ b/sources/pyside2/tests/QtCore/bug_515.py @@ -29,6 +29,14 @@ """ Unittest for bug #515 """ """ http://bugs.openbossa.org/show_bug.cgi?id=515 """ +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths() + from PySide2 import QtCore callCleanup = False diff --git a/sources/pyside2/tests/QtCore/bug_606.py b/sources/pyside2/tests/QtCore/bug_606.py index 44126e943..423b088dc 100644 --- a/sources/pyside2/tests/QtCore/bug_606.py +++ b/sources/pyside2/tests/QtCore/bug_606.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + import PySide2 from PySide2.QtCore import QPoint, QPointF from PySide2.QtCore import QLine, QLineF diff --git a/sources/pyside2/tests/QtCore/bug_656.py b/sources/pyside2/tests/QtCore/bug_656.py index 1b9fe6a9c..d3cd05f28 100644 --- a/sources/pyside2/tests/QtCore/bug_656.py +++ b/sources/pyside2/tests/QtCore/bug_656.py @@ -26,6 +26,14 @@ ## ############################################################################# +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths() + from PySide2.QtCore import * class CoreApp(QCoreApplication): diff --git a/sources/pyside2/tests/QtCore/bug_686.py b/sources/pyside2/tests/QtCore/bug_686.py index fa8ad8d65..6e4f8994a 100644 --- a/sources/pyside2/tests/QtCore/bug_686.py +++ b/sources/pyside2/tests/QtCore/bug_686.py @@ -28,7 +28,14 @@ from __future__ import with_statement +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class MyWriteThread(QThread): diff --git a/sources/pyside2/tests/QtCore/bug_699.py b/sources/pyside2/tests/QtCore/bug_699.py index 98340f3df..c86c485f9 100644 --- a/sources/pyside2/tests/QtCore/bug_699.py +++ b/sources/pyside2/tests/QtCore/bug_699.py @@ -26,7 +26,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class TestBug699 (unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/bug_706.py b/sources/pyside2/tests/QtCore/bug_706.py index 1984cfff9..21743bf25 100644 --- a/sources/pyside2/tests/QtCore/bug_706.py +++ b/sources/pyside2/tests/QtCore/bug_706.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class MyModel (QAbstractListModel): diff --git a/sources/pyside2/tests/QtCore/bug_820.py b/sources/pyside2/tests/QtCore/bug_820.py index f55954295..5d45f682e 100644 --- a/sources/pyside2/tests/QtCore/bug_820.py +++ b/sources/pyside2/tests/QtCore/bug_820.py @@ -27,8 +27,14 @@ ############################################################################# import functools +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject, Slot, Signal, SIGNAL def log_exception(): diff --git a/sources/pyside2/tests/QtCore/bug_826.py b/sources/pyside2/tests/QtCore/bug_826.py index b5701fc5a..cb72e011e 100644 --- a/sources/pyside2/tests/QtCore/bug_826.py +++ b/sources/pyside2/tests/QtCore/bug_826.py @@ -26,10 +26,17 @@ ## ############################################################################# +import os +import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QEvent, Qt import PySide2 -import unittest TEST_EVENT_TYPE = QEvent.Type(QEvent.registerEventType()) diff --git a/sources/pyside2/tests/QtCore/bug_829.py b/sources/pyside2/tests/QtCore/bug_829.py index 1384c017a..237ae0406 100644 --- a/sources/pyside2/tests/QtCore/bug_829.py +++ b/sources/pyside2/tests/QtCore/bug_829.py @@ -29,9 +29,16 @@ # Test case for PySide bug 829 +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QDir, QSettings, QTemporaryFile -import os + class QVariantConversions(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/bug_835.py b/sources/pyside2/tests/QtCore/bug_835.py index 59cb612ac..e72ce500c 100644 --- a/sources/pyside2/tests/QtCore/bug_835.py +++ b/sources/pyside2/tests/QtCore/bug_835.py @@ -26,9 +26,16 @@ ## ############################################################################# +import os +import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * -import unittest get_counter = 0 set_counter = 0 diff --git a/sources/pyside2/tests/QtCore/bug_920.py b/sources/pyside2/tests/QtCore/bug_920.py index 196727668..b0cd84e6a 100644 --- a/sources/pyside2/tests/QtCore/bug_920.py +++ b/sources/pyside2/tests/QtCore/bug_920.py @@ -28,8 +28,14 @@ ## ############################################################################# +import os import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + import PySide2.QtCore as QtCore class Signaller(QtCore.QObject): diff --git a/sources/pyside2/tests/QtCore/bug_927.py b/sources/pyside2/tests/QtCore/bug_927.py index 1a5be71f7..1883bf5e8 100644 --- a/sources/pyside2/tests/QtCore/bug_927.py +++ b/sources/pyside2/tests/QtCore/bug_927.py @@ -26,9 +26,15 @@ ## ############################################################################# +import os +import sys import time import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QTime, QRunnable, QThreadPool class Task(QRunnable): diff --git a/sources/pyside2/tests/QtCore/bug_931.py b/sources/pyside2/tests/QtCore/bug_931.py index 528a0847d..8220ecaba 100644 --- a/sources/pyside2/tests/QtCore/bug_931.py +++ b/sources/pyside2/tests/QtCore/bug_931.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject, Signal o = QObject() class MyObject(QObject): diff --git a/sources/pyside2/tests/QtCore/bug_938.py b/sources/pyside2/tests/QtCore/bug_938.py index 6cbf5018b..bbac1845b 100644 --- a/sources/pyside2/tests/QtCore/bug_938.py +++ b/sources/pyside2/tests/QtCore/bug_938.py @@ -30,7 +30,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import * import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/bug_953.py b/sources/pyside2/tests/QtCore/bug_953.py index 2aa2b638d..a250ebe32 100644 --- a/sources/pyside2/tests/QtCore/bug_953.py +++ b/sources/pyside2/tests/QtCore/bug_953.py @@ -26,6 +26,14 @@ ## ############################################################################# +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths() + from PySide2.QtCore import * class Dispatcher(QObject): diff --git a/sources/pyside2/tests/QtCore/bug_987.py b/sources/pyside2/tests/QtCore/bug_987.py index e5c7f1b0b..56e5e517e 100644 --- a/sources/pyside2/tests/QtCore/bug_987.py +++ b/sources/pyside2/tests/QtCore/bug_987.py @@ -26,10 +26,16 @@ ## ############################################################################# -from PySide2.QtCore import QObject - +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + +from PySide2.QtCore import QObject + class TestBug987(unittest.TestCase): def callback(self): diff --git a/sources/pyside2/tests/QtCore/bug_994.py b/sources/pyside2/tests/QtCore/bug_994.py index 53e822bfc..1a9649a10 100644 --- a/sources/pyside2/tests/QtCore/bug_994.py +++ b/sources/pyside2/tests/QtCore/bug_994.py @@ -30,7 +30,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k from PySide2.QtCore import QIODevice, QTextStream diff --git a/sources/pyside2/tests/QtCore/bug_PYSIDE-164.py b/sources/pyside2/tests/QtCore/bug_PYSIDE-164.py index 3ed10be5f..96c892fd6 100644 --- a/sources/pyside2/tests/QtCore/bug_PYSIDE-164.py +++ b/sources/pyside2/tests/QtCore/bug_PYSIDE-164.py @@ -28,8 +28,14 @@ from __future__ import print_function +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QCoreApplication, QEventLoop, QObject, Qt, QThread, QTimer, SIGNAL class Emitter(QThread): diff --git a/sources/pyside2/tests/QtCore/bug_PYSIDE-42.py b/sources/pyside2/tests/QtCore/bug_PYSIDE-42.py index 9555bb419..46e3c6d11 100644 --- a/sources/pyside2/tests/QtCore/bug_PYSIDE-42.py +++ b/sources/pyside2/tests/QtCore/bug_PYSIDE-42.py @@ -26,9 +26,17 @@ ## ############################################################################# -from PySide2.QtCore import * +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + +from PySide2.QtCore import * + + class TestBugPYSIDE42 (unittest.TestCase): def testIt(self): diff --git a/sources/pyside2/tests/QtCore/child_event_test.py b/sources/pyside2/tests/QtCore/child_event_test.py index 4a6ea6793..8c600210a 100644 --- a/sources/pyside2/tests/QtCore/child_event_test.py +++ b/sources/pyside2/tests/QtCore/child_event_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, QTimer, QCoreApplication from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/QtCore/classinfo_test.py b/sources/pyside2/tests/QtCore/classinfo_test.py index a1890f956..634e8f350 100644 --- a/sources/pyside2/tests/QtCore/classinfo_test.py +++ b/sources/pyside2/tests/QtCore/classinfo_test.py @@ -27,8 +27,14 @@ ############################################################################# import sys +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject, QCoreApplication, ClassInfo class TestClassInfo(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/deepcopy_test.py b/sources/pyside2/tests/QtCore/deepcopy_test.py index 87fbe7a82..ab17a2e14 100644 --- a/sources/pyside2/tests/QtCore/deepcopy_test.py +++ b/sources/pyside2/tests/QtCore/deepcopy_test.py @@ -31,7 +31,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QByteArray, QDate, QDateTime, QTime, QLine, QLineF from PySide2.QtCore import Qt, QSize, QSizeF, QRect, QRectF, QDir, QPoint, QPointF diff --git a/sources/pyside2/tests/QtCore/deletelater_test.py b/sources/pyside2/tests/QtCore/deletelater_test.py index 1a0fbca19..62268c1d0 100644 --- a/sources/pyside2/tests/QtCore/deletelater_test.py +++ b/sources/pyside2/tests/QtCore/deletelater_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, QTimer, QCoreApplication, SIGNAL from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/QtCore/destroysignal_test.py b/sources/pyside2/tests/QtCore/destroysignal_test.py index 37e78206e..1396a487b 100644 --- a/sources/pyside2/tests/QtCore/destroysignal_test.py +++ b/sources/pyside2/tests/QtCore/destroysignal_test.py @@ -26,10 +26,17 @@ ## ############################################################################# -from PySide2.QtCore import QTimer, QObject +import os import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + +from PySide2.QtCore import QTimer, QObject + + class TestDestroySignal(unittest.TestCase): def onObjectDestroyed(self, timer): self.assertTrue(isinstance(timer, QObject)) diff --git a/sources/pyside2/tests/QtCore/duck_punching_test.py b/sources/pyside2/tests/QtCore/duck_punching_test.py index 27eaf341a..3450314dd 100644 --- a/sources/pyside2/tests/QtCore/duck_punching_test.py +++ b/sources/pyside2/tests/QtCore/duck_punching_test.py @@ -35,7 +35,9 @@ import sys import types import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/QtCore/emoji_string_test.py b/sources/pyside2/tests/QtCore/emoji_string_test.py index 2e0522878..0bf088dee 100644 --- a/sources/pyside2/tests/QtCore/emoji_string_test.py +++ b/sources/pyside2/tests/QtCore/emoji_string_test.py @@ -50,7 +50,14 @@ source itself, utf8 encoding in line 1 and a short plausibility test to make it safely fail. """ +import os import sys + +sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths() + from PySide2 import QtCore emoji_str = u'\U0001f632' + u' ' # "😲 " diff --git a/sources/pyside2/tests/QtCore/hash_test.py b/sources/pyside2/tests/QtCore/hash_test.py index 6e8a4aaad..9ef1dfe08 100644 --- a/sources/pyside2/tests/QtCore/hash_test.py +++ b/sources/pyside2/tests/QtCore/hash_test.py @@ -28,7 +28,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QDate, QDateTime, QTime, QUrl from PySide2.QtCore import QLine, QPoint, QRect, QSize diff --git a/sources/pyside2/tests/QtCore/inherits_test.py b/sources/pyside2/tests/QtCore/inherits_test.py index 1f5fa49e9..d8b68d816 100644 --- a/sources/pyside2/tests/QtCore/inherits_test.py +++ b/sources/pyside2/tests/QtCore/inherits_test.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject class MyObject(QObject): diff --git a/sources/pyside2/tests/QtCore/max_signals.py b/sources/pyside2/tests/QtCore/max_signals.py index 1f7e7f822..46fd1ba4f 100644 --- a/sources/pyside2/tests/QtCore/max_signals.py +++ b/sources/pyside2/tests/QtCore/max_signals.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject, SIGNAL class MyObject(QObject): diff --git a/sources/pyside2/tests/QtCore/missing_symbols_test.py b/sources/pyside2/tests/QtCore/missing_symbols_test.py index ac8828012..a69603e1a 100644 --- a/sources/pyside2/tests/QtCore/missing_symbols_test.py +++ b/sources/pyside2/tests/QtCore/missing_symbols_test.py @@ -28,7 +28,14 @@ '''(Very) Simple test case for missing names from QtCore''' +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2 import QtCore class MissingClasses(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/mockclass_test.py b/sources/pyside2/tests/QtCore/mockclass_test.py index 1b730e714..9fb689e6e 100644 --- a/sources/pyside2/tests/QtCore/mockclass_test.py +++ b/sources/pyside2/tests/QtCore/mockclass_test.py @@ -30,7 +30,14 @@ # http://bugs.pyside.org/show_bug.cgi?id=634 # Marcus Lindblom <macke@yar.nu>; 2011-02-16 +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QCoreApplication class Mock(object): diff --git a/sources/pyside2/tests/QtCore/python_conversion.py b/sources/pyside2/tests/QtCore/python_conversion.py index d10ecea54..a32529a17 100644 --- a/sources/pyside2/tests/QtCore/python_conversion.py +++ b/sources/pyside2/tests/QtCore/python_conversion.py @@ -30,7 +30,14 @@ '''Test cases for QLineF''' +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + import datetime from PySide2.QtCore import QTime, QDateTime, QDate diff --git a/sources/pyside2/tests/QtCore/qabs_test.py b/sources/pyside2/tests/QtCore/qabs_test.py index bc698d3dc..a63f37293 100644 --- a/sources/pyside2/tests/QtCore/qabs_test.py +++ b/sources/pyside2/tests/QtCore/qabs_test.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2 import QtCore diff --git a/sources/pyside2/tests/QtCore/qabstractitemmodel_test.py b/sources/pyside2/tests/QtCore/qabstractitemmodel_test.py index fd8d01c99..2901f4dcc 100644 --- a/sources/pyside2/tests/QtCore/qabstractitemmodel_test.py +++ b/sources/pyside2/tests/QtCore/qabstractitemmodel_test.py @@ -28,7 +28,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class MyModel (QAbstractListModel): diff --git a/sources/pyside2/tests/QtCore/qabstracttransition_test.py b/sources/pyside2/tests/QtCore/qabstracttransition_test.py index 247914517..063d266d2 100644 --- a/sources/pyside2/tests/QtCore/qabstracttransition_test.py +++ b/sources/pyside2/tests/QtCore/qabstracttransition_test.py @@ -28,8 +28,15 @@ ## ############################################################################# -import unittest +import os +import sys from sys import getrefcount +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * def addStates(transition): diff --git a/sources/pyside2/tests/QtCore/qanimationgroup_test.py b/sources/pyside2/tests/QtCore/qanimationgroup_test.py index 08b410aae..961d1a754 100644 --- a/sources/pyside2/tests/QtCore/qanimationgroup_test.py +++ b/sources/pyside2/tests/QtCore/qanimationgroup_test.py @@ -28,7 +28,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class QAnimationGroupTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qbitarray_test.py b/sources/pyside2/tests/QtCore/qbitarray_test.py index 72117ad7c..d8d1d5147 100644 --- a/sources/pyside2/tests/QtCore/qbitarray_test.py +++ b/sources/pyside2/tests/QtCore/qbitarray_test.py @@ -30,8 +30,14 @@ '''Tests if QBitArray class is iterable and also '~' (__invert__) and bitwise operators''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QBitArray def bool_list_from_qbitarray(qbitarray): diff --git a/sources/pyside2/tests/QtCore/qbytearray_buffer_protocol_test.py b/sources/pyside2/tests/QtCore/qbytearray_buffer_protocol_test.py index 93527f9d7..20f8fa915 100644 --- a/sources/pyside2/tests/QtCore/qbytearray_buffer_protocol_test.py +++ b/sources/pyside2/tests/QtCore/qbytearray_buffer_protocol_test.py @@ -36,7 +36,9 @@ from os.path import isdir import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py b/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py index a3986278c..1375c3ab3 100644 --- a/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py +++ b/sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py @@ -35,7 +35,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QByteArray import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qbytearray_operator_iadd_test.py b/sources/pyside2/tests/QtCore/qbytearray_operator_iadd_test.py index 15d870bde..d0a65465b 100644 --- a/sources/pyside2/tests/QtCore/qbytearray_operator_iadd_test.py +++ b/sources/pyside2/tests/QtCore/qbytearray_operator_iadd_test.py @@ -30,7 +30,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QByteArray from helper.docmodifier import DocModifier diff --git a/sources/pyside2/tests/QtCore/qbytearray_operator_test.py b/sources/pyside2/tests/QtCore/qbytearray_operator_test.py index 69d016a6b..b19179429 100644 --- a/sources/pyside2/tests/QtCore/qbytearray_operator_test.py +++ b/sources/pyside2/tests/QtCore/qbytearray_operator_test.py @@ -35,7 +35,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qbytearray_test.py b/sources/pyside2/tests/QtCore/qbytearray_test.py index 99813425e..8f1c9c201 100644 --- a/sources/pyside2/tests/QtCore/qbytearray_test.py +++ b/sources/pyside2/tests/QtCore/qbytearray_test.py @@ -37,7 +37,9 @@ import pickle import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qcalendar_test.py b/sources/pyside2/tests/QtCore/qcalendar_test.py index 4b595a011..e75931ad5 100644 --- a/sources/pyside2/tests/QtCore/qcalendar_test.py +++ b/sources/pyside2/tests/QtCore/qcalendar_test.py @@ -30,8 +30,14 @@ '''Test cases for QCalendar (5.14)''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QCalendar class TestQCalendar (unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qcbor_test.py b/sources/pyside2/tests/QtCore/qcbor_test.py index 2ac46673a..ec99e04f5 100644 --- a/sources/pyside2/tests/QtCore/qcbor_test.py +++ b/sources/pyside2/tests/QtCore/qcbor_test.py @@ -30,8 +30,14 @@ '''Test cases for QCbor''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import (QByteArray, QCborStreamReader, QCborStreamWriter, QCborValue) diff --git a/sources/pyside2/tests/QtCore/qcollator_test.py b/sources/pyside2/tests/QtCore/qcollator_test.py index 231ce5bbe..3aa33240a 100644 --- a/sources/pyside2/tests/QtCore/qcollator_test.py +++ b/sources/pyside2/tests/QtCore/qcollator_test.py @@ -30,9 +30,14 @@ '''Unit tests for QCollator''' -import unittest import ctypes +import os import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtCore/qcommandlineparser_test.py b/sources/pyside2/tests/QtCore/qcommandlineparser_test.py index 207dbbe73..a947cf48f 100644 --- a/sources/pyside2/tests/QtCore/qcommandlineparser_test.py +++ b/sources/pyside2/tests/QtCore/qcommandlineparser_test.py @@ -30,9 +30,14 @@ '''Unit tests for QCommandLineParser and QCommandLineOption''' -import unittest import ctypes +import os import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtCore/qcoreapplication_instance_test.py b/sources/pyside2/tests/QtCore/qcoreapplication_instance_test.py index ad1dee0bf..1e1a64204 100644 --- a/sources/pyside2/tests/QtCore/qcoreapplication_instance_test.py +++ b/sources/pyside2/tests/QtCore/qcoreapplication_instance_test.py @@ -31,8 +31,14 @@ '''Test cases for QCoreApplication.instance static method''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QCoreApplication class QCoreApplicationInstanceTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qcoreapplication_test.py b/sources/pyside2/tests/QtCore/qcoreapplication_test.py index 15a905846..b9907abbf 100644 --- a/sources/pyside2/tests/QtCore/qcoreapplication_test.py +++ b/sources/pyside2/tests/QtCore/qcoreapplication_test.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QCoreApplication class TestQCoreApplication(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qdatastream_test.py b/sources/pyside2/tests/QtCore/qdatastream_test.py index b50b1d157..a2d2908b2 100644 --- a/sources/pyside2/tests/QtCore/qdatastream_test.py +++ b/sources/pyside2/tests/QtCore/qdatastream_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qdate_test.py b/sources/pyside2/tests/QtCore/qdate_test.py index 8c3ddb0d3..911a042b8 100644 --- a/sources/pyside2/tests/QtCore/qdate_test.py +++ b/sources/pyside2/tests/QtCore/qdate_test.py @@ -30,8 +30,14 @@ '''Test cases for QDate''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class TestQDate (unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qdatetime_test.py b/sources/pyside2/tests/QtCore/qdatetime_test.py index 9da514277..4d98156d8 100644 --- a/sources/pyside2/tests/QtCore/qdatetime_test.py +++ b/sources/pyside2/tests/QtCore/qdatetime_test.py @@ -26,8 +26,14 @@ ## ############################################################################# -import unittest import datetime +import os +import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QDateTime, QDate, QTime diff --git a/sources/pyside2/tests/QtCore/qeasingcurve_test.py b/sources/pyside2/tests/QtCore/qeasingcurve_test.py index 3975d1f2c..82d45f978 100644 --- a/sources/pyside2/tests/QtCore/qeasingcurve_test.py +++ b/sources/pyside2/tests/QtCore/qeasingcurve_test.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QEasingCurve def myFunction(progress): diff --git a/sources/pyside2/tests/QtCore/qenum_test.py b/sources/pyside2/tests/QtCore/qenum_test.py index ada625f24..dd91d1581 100644 --- a/sources/pyside2/tests/QtCore/qenum_test.py +++ b/sources/pyside2/tests/QtCore/qenum_test.py @@ -30,8 +30,14 @@ '''Test cases for QEnum and QFlags''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class TestEnum(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qevent_test.py b/sources/pyside2/tests/QtCore/qevent_test.py index c390c6afe..a3e4f7116 100644 --- a/sources/pyside2/tests/QtCore/qevent_test.py +++ b/sources/pyside2/tests/QtCore/qevent_test.py @@ -30,8 +30,14 @@ '''Test cases for QtCore.QEvent''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QEvent class QEventTypeFlag(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qfile_test.py b/sources/pyside2/tests/QtCore/qfile_test.py index 69208a49d..960d0d1d8 100644 --- a/sources/pyside2/tests/QtCore/qfile_test.py +++ b/sources/pyside2/tests/QtCore/qfile_test.py @@ -31,7 +31,9 @@ import sys import tempfile import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qfileinfo_test.py b/sources/pyside2/tests/QtCore/qfileinfo_test.py index 16e606a2c..07b37cc51 100644 --- a/sources/pyside2/tests/QtCore/qfileinfo_test.py +++ b/sources/pyside2/tests/QtCore/qfileinfo_test.py @@ -26,10 +26,14 @@ ## ############################################################################# -import unittest - import os +import sys import tempfile +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QFile, QFileInfo diff --git a/sources/pyside2/tests/QtCore/qfileread_test.py b/sources/pyside2/tests/QtCore/qfileread_test.py index 16d9082fb..1a9afd1ab 100644 --- a/sources/pyside2/tests/QtCore/qfileread_test.py +++ b/sources/pyside2/tests/QtCore/qfileread_test.py @@ -30,7 +30,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QIODevice, QTemporaryFile import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qflags_test.py b/sources/pyside2/tests/QtCore/qflags_test.py index 7d558424e..08a7c55b1 100644 --- a/sources/pyside2/tests/QtCore/qflags_test.py +++ b/sources/pyside2/tests/QtCore/qflags_test.py @@ -30,7 +30,14 @@ '''Test cases for QFlags''' +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import Qt, QTemporaryFile, QFile, QIODevice, QObject class QFlagTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qhandle_test.py b/sources/pyside2/tests/QtCore/qhandle_test.py index db7804467..76dfbd32e 100644 --- a/sources/pyside2/tests/QtCore/qhandle_test.py +++ b/sources/pyside2/tests/QtCore/qhandle_test.py @@ -30,8 +30,14 @@ '''Test cases for QEnum and QFlags''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QThread, Qt class TestHANDLE(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py b/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py index f14c89311..f46ace5a0 100644 --- a/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py +++ b/sources/pyside2/tests/QtCore/qinstallmsghandler_test.py @@ -28,8 +28,13 @@ '''Test cases for qInstallMsgHandler''' -import unittest +import os import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtCore/qjsondocument_test.py b/sources/pyside2/tests/QtCore/qjsondocument_test.py index 65f83abe3..3f8a9c848 100644 --- a/sources/pyside2/tests/QtCore/qjsondocument_test.py +++ b/sources/pyside2/tests/QtCore/qjsondocument_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QJsonDocument import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qlinef_test.py b/sources/pyside2/tests/QtCore/qlinef_test.py index 2261602c5..084937c06 100644 --- a/sources/pyside2/tests/QtCore/qlinef_test.py +++ b/sources/pyside2/tests/QtCore/qlinef_test.py @@ -30,8 +30,13 @@ '''Test cases for QLineF''' -import unittest import os +import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtCore/qlocale_test.py b/sources/pyside2/tests/QtCore/qlocale_test.py index 44374f808..7c797339a 100644 --- a/sources/pyside2/tests/QtCore/qlocale_test.py +++ b/sources/pyside2/tests/QtCore/qlocale_test.py @@ -30,9 +30,14 @@ '''Unit tests for QLocale''' -import unittest import ctypes +import os import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QLocale diff --git a/sources/pyside2/tests/QtCore/qlockfile_test.py b/sources/pyside2/tests/QtCore/qlockfile_test.py index e943af2b7..38b6b7c42 100644 --- a/sources/pyside2/tests/QtCore/qlockfile_test.py +++ b/sources/pyside2/tests/QtCore/qlockfile_test.py @@ -30,7 +30,14 @@ '''Test cases for QLockFile''' -import os, unittest +import os +import sys +import unittest + +sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths() from PySide2.QtCore import QDir, QLockFile, QCoreApplication diff --git a/sources/pyside2/tests/QtCore/qmessageauthenticationcode_test.py b/sources/pyside2/tests/QtCore/qmessageauthenticationcode_test.py index 2a63e25a2..225807b9e 100644 --- a/sources/pyside2/tests/QtCore/qmessageauthenticationcode_test.py +++ b/sources/pyside2/tests/QtCore/qmessageauthenticationcode_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QCryptographicHash, QMessageAuthenticationCode import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qmetaobject_test.py b/sources/pyside2/tests/QtCore/qmetaobject_test.py index 81a3e7015..d79abb1da 100644 --- a/sources/pyside2/tests/QtCore/qmetaobject_test.py +++ b/sources/pyside2/tests/QtCore/qmetaobject_test.py @@ -31,8 +31,14 @@ '''Tests for static methos conflicts with class methods''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class Foo(QFile): diff --git a/sources/pyside2/tests/QtCore/qmimedatabase_test.py b/sources/pyside2/tests/QtCore/qmimedatabase_test.py index 1e4e3b574..78ce55328 100644 --- a/sources/pyside2/tests/QtCore/qmimedatabase_test.py +++ b/sources/pyside2/tests/QtCore/qmimedatabase_test.py @@ -30,9 +30,14 @@ '''Unit tests for QMimeDatabase''' -import unittest import ctypes +import os import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QMimeDatabase, QLocale diff --git a/sources/pyside2/tests/QtCore/qmodelindex_internalpointer_test.py b/sources/pyside2/tests/QtCore/qmodelindex_internalpointer_test.py index 770600ea3..83f9d8486 100644 --- a/sources/pyside2/tests/QtCore/qmodelindex_internalpointer_test.py +++ b/sources/pyside2/tests/QtCore/qmodelindex_internalpointer_test.py @@ -30,8 +30,14 @@ ''' Test case for QAbstractListModel.createIndex and QModelIndex.internalPointer''' +import os import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * class MyModel (QAbstractListModel): diff --git a/sources/pyside2/tests/QtCore/qobject_children_segfault_test.py b/sources/pyside2/tests/QtCore/qobject_children_segfault_test.py index 2b6218aaf..a5604bb70 100644 --- a/sources/pyside2/tests/QtCore/qobject_children_segfault_test.py +++ b/sources/pyside2/tests/QtCore/qobject_children_segfault_test.py @@ -28,8 +28,14 @@ '''Test cases for parent-child relationship''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject, QCoreApplication class ChildrenCoreApplication(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qobject_connect_notify_test.py b/sources/pyside2/tests/QtCore/qobject_connect_notify_test.py index 74db16ff8..5d9d8052c 100644 --- a/sources/pyside2/tests/QtCore/qobject_connect_notify_test.py +++ b/sources/pyside2/tests/QtCore/qobject_connect_notify_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import * from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/QtCore/qobject_destructor.py b/sources/pyside2/tests/QtCore/qobject_destructor.py index ef322cb3e..d94779239 100644 --- a/sources/pyside2/tests/QtCore/qobject_destructor.py +++ b/sources/pyside2/tests/QtCore/qobject_destructor.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2 import QtCore class MyObject(QtCore.QObject): diff --git a/sources/pyside2/tests/QtCore/qobject_event_filter_test.py b/sources/pyside2/tests/QtCore/qobject_event_filter_test.py index 4b372df3a..ff46bc79f 100644 --- a/sources/pyside2/tests/QtCore/qobject_event_filter_test.py +++ b/sources/pyside2/tests/QtCore/qobject_event_filter_test.py @@ -33,7 +33,9 @@ import sys import unittest import weakref -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, QTimerEvent diff --git a/sources/pyside2/tests/QtCore/qobject_inherits_test.py b/sources/pyside2/tests/QtCore/qobject_inherits_test.py index 3a87da347..bc6e00654 100644 --- a/sources/pyside2/tests/QtCore/qobject_inherits_test.py +++ b/sources/pyside2/tests/QtCore/qobject_inherits_test.py @@ -28,8 +28,13 @@ '''Test cases for QObject methods''' -import unittest +import os import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, QTimer from PySide2.QtWidgets import QApplication, QLabel, QVBoxLayout diff --git a/sources/pyside2/tests/QtCore/qobject_objectproperty_test.py b/sources/pyside2/tests/QtCore/qobject_objectproperty_test.py index bade8fe46..b2c6305cd 100644 --- a/sources/pyside2/tests/QtCore/qobject_objectproperty_test.py +++ b/sources/pyside2/tests/QtCore/qobject_objectproperty_test.py @@ -33,7 +33,14 @@ http://bugs.openbossa.org/show_bug.cgi?id=378 ''' +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject class ExtQObject(QObject): diff --git a/sources/pyside2/tests/QtCore/qobject_parent_test.py b/sources/pyside2/tests/QtCore/qobject_parent_test.py index 85b709137..7e98100a1 100644 --- a/sources/pyside2/tests/QtCore/qobject_parent_test.py +++ b/sources/pyside2/tests/QtCore/qobject_parent_test.py @@ -28,8 +28,14 @@ '''Test cases for parent-child relationship''' -import unittest +import os +import sys from sys import getrefcount +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtCore/qobject_property_test.py b/sources/pyside2/tests/QtCore/qobject_property_test.py index 80d652ab5..0592bf652 100644 --- a/sources/pyside2/tests/QtCore/qobject_property_test.py +++ b/sources/pyside2/tests/QtCore/qobject_property_test.py @@ -28,8 +28,14 @@ '''Test cases for QObject property and setProperty''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject, Property, Signal class MyObjectWithNotifyProperty(QObject): diff --git a/sources/pyside2/tests/QtCore/qobject_protected_methods_test.py b/sources/pyside2/tests/QtCore/qobject_protected_methods_test.py index 26376e449..3af811e96 100644 --- a/sources/pyside2/tests/QtCore/qobject_protected_methods_test.py +++ b/sources/pyside2/tests/QtCore/qobject_protected_methods_test.py @@ -30,8 +30,14 @@ '''Test cases for QObject protected methods''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject, QThread, SIGNAL class Dummy(QObject): diff --git a/sources/pyside2/tests/QtCore/qobject_test.py b/sources/pyside2/tests/QtCore/qobject_test.py index ade885e7d..dd577ecdc 100644 --- a/sources/pyside2/tests/QtCore/qobject_test.py +++ b/sources/pyside2/tests/QtCore/qobject_test.py @@ -35,7 +35,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qobject_timer_event_test.py b/sources/pyside2/tests/QtCore/qobject_timer_event_test.py index 7abc1528b..bdf074653 100644 --- a/sources/pyside2/tests/QtCore/qobject_timer_event_test.py +++ b/sources/pyside2/tests/QtCore/qobject_timer_event_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, QCoreApplication diff --git a/sources/pyside2/tests/QtCore/qobject_tr_as_instance_test.py b/sources/pyside2/tests/QtCore/qobject_tr_as_instance_test.py index ee416d08f..bbcd0b99a 100644 --- a/sources/pyside2/tests/QtCore/qobject_tr_as_instance_test.py +++ b/sources/pyside2/tests/QtCore/qobject_tr_as_instance_test.py @@ -36,7 +36,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject diff --git a/sources/pyside2/tests/QtCore/qoperatingsystemversion_test.py b/sources/pyside2/tests/QtCore/qoperatingsystemversion_test.py index 82c571d18..bd0ba66db 100644 --- a/sources/pyside2/tests/QtCore/qoperatingsystemversion_test.py +++ b/sources/pyside2/tests/QtCore/qoperatingsystemversion_test.py @@ -26,7 +26,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QOperatingSystemVersion class TestQOperatingSystemVersion(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qpoint_test.py b/sources/pyside2/tests/QtCore/qpoint_test.py index e77662772..e73c37e5b 100644 --- a/sources/pyside2/tests/QtCore/qpoint_test.py +++ b/sources/pyside2/tests/QtCore/qpoint_test.py @@ -28,8 +28,14 @@ '''Test cases for QPoint and QPointF''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QPoint, QPointF diff --git a/sources/pyside2/tests/QtCore/qprocess_test.py b/sources/pyside2/tests/QtCore/qprocess_test.py index 72b2e08cb..eb5753f45 100644 --- a/sources/pyside2/tests/QtCore/qprocess_test.py +++ b/sources/pyside2/tests/QtCore/qprocess_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qproperty_decorator.py b/sources/pyside2/tests/QtCore/qproperty_decorator.py index c6f0d3c37..aa31e59c4 100644 --- a/sources/pyside2/tests/QtCore/qproperty_decorator.py +++ b/sources/pyside2/tests/QtCore/qproperty_decorator.py @@ -26,8 +26,14 @@ ## ############################################################################# -import weakref +import os +import sys import unittest +import weakref + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, Property diff --git a/sources/pyside2/tests/QtCore/qrandomgenerator_test.py b/sources/pyside2/tests/QtCore/qrandomgenerator_test.py index 2b732ad5e..170a31662 100644 --- a/sources/pyside2/tests/QtCore/qrandomgenerator_test.py +++ b/sources/pyside2/tests/QtCore/qrandomgenerator_test.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QRandomGenerator, QRandomGenerator64 class QRandomGeneratorTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qrect_test.py b/sources/pyside2/tests/QtCore/qrect_test.py index bcf9f95ba..9116d7b58 100644 --- a/sources/pyside2/tests/QtCore/qrect_test.py +++ b/sources/pyside2/tests/QtCore/qrect_test.py @@ -30,8 +30,14 @@ '''Test cases for QRect''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QPoint, QRect, QRectF class RectConstructor(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qregexp_test.py b/sources/pyside2/tests/QtCore/qregexp_test.py index 36d3b07cc..a031137fd 100644 --- a/sources/pyside2/tests/QtCore/qregexp_test.py +++ b/sources/pyside2/tests/QtCore/qregexp_test.py @@ -28,7 +28,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QRegExp class QRegExpTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qregularexpression_test.py b/sources/pyside2/tests/QtCore/qregularexpression_test.py index cef3ec668..fb2e9c24c 100644 --- a/sources/pyside2/tests/QtCore/qregularexpression_test.py +++ b/sources/pyside2/tests/QtCore/qregularexpression_test.py @@ -30,7 +30,14 @@ '''Unit tests for QRegularExpression''' +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QRegularExpression, QRegularExpressionMatch, QRegularExpressionMatchIterator class QRegularExpressionTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qresource_test.py b/sources/pyside2/tests/QtCore/qresource_test.py index 953786799..3ec925032 100644 --- a/sources/pyside2/tests/QtCore/qresource_test.py +++ b/sources/pyside2/tests/QtCore/qresource_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from helper.helper import adjust_filename from PySide2.QtCore import QFile, QIODevice diff --git a/sources/pyside2/tests/QtCore/qsettings_test.py b/sources/pyside2/tests/QtCore/qsettings_test.py index 97aa7522b..982ddc38d 100644 --- a/sources/pyside2/tests/QtCore/qsettings_test.py +++ b/sources/pyside2/tests/QtCore/qsettings_test.py @@ -32,7 +32,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from helper.helper import adjust_filename import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qsize_test.py b/sources/pyside2/tests/QtCore/qsize_test.py index 1bc7779fb..1bf31fae6 100644 --- a/sources/pyside2/tests/QtCore/qsize_test.py +++ b/sources/pyside2/tests/QtCore/qsize_test.py @@ -30,8 +30,14 @@ '''Unit tests for QSize''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QSize class QSizeOperator(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qslot_object_test.py b/sources/pyside2/tests/QtCore/qslot_object_test.py index 7a2691a06..252a09bea 100644 --- a/sources/pyside2/tests/QtCore/qslot_object_test.py +++ b/sources/pyside2/tests/QtCore/qslot_object_test.py @@ -28,7 +28,13 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2 import QtCore """ diff --git a/sources/pyside2/tests/QtCore/qsocketnotifier_test.py b/sources/pyside2/tests/QtCore/qsocketnotifier_test.py index 0a9b78af3..cd3d783de 100644 --- a/sources/pyside2/tests/QtCore/qsocketnotifier_test.py +++ b/sources/pyside2/tests/QtCore/qsocketnotifier_test.py @@ -30,13 +30,18 @@ '''Unit tests for QUuid''' +import os +import socket +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtWidgets import QApplication from PySide2.QtCore import QSocketNotifier -import socket -import sys -import os + class QSocketNotifierTest(unittest.TestCase): def testClass(self): diff --git a/sources/pyside2/tests/QtCore/qsrand_test.py b/sources/pyside2/tests/QtCore/qsrand_test.py index 459bfeb59..cdad78237 100644 --- a/sources/pyside2/tests/QtCore/qsrand_test.py +++ b/sources/pyside2/tests/QtCore/qsrand_test.py @@ -27,8 +27,14 @@ ############################################################################# import gc +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import qsrand class OverflowExceptionCollect(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qstandardpaths_test.py b/sources/pyside2/tests/QtCore/qstandardpaths_test.py index 957aa4e18..67c7b4a9b 100644 --- a/sources/pyside2/tests/QtCore/qstandardpaths_test.py +++ b/sources/pyside2/tests/QtCore/qstandardpaths_test.py @@ -30,9 +30,14 @@ '''Unit tests for QStandardPaths''' -import unittest import ctypes +import os import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QStandardPaths diff --git a/sources/pyside2/tests/QtCore/qstate_test.py b/sources/pyside2/tests/QtCore/qstate_test.py index 8627f4bba..4c97fecca 100644 --- a/sources/pyside2/tests/QtCore/qstate_test.py +++ b/sources/pyside2/tests/QtCore/qstate_test.py @@ -28,7 +28,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtCore/qstatemachine_test.py b/sources/pyside2/tests/QtCore/qstatemachine_test.py index 388d9ed01..19dcb1e81 100644 --- a/sources/pyside2/tests/QtCore/qstatemachine_test.py +++ b/sources/pyside2/tests/QtCore/qstatemachine_test.py @@ -32,7 +32,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, QState, QFinalState, SIGNAL from PySide2.QtCore import QTimer, QStateMachine diff --git a/sources/pyside2/tests/QtCore/qstorageinfo_test.py b/sources/pyside2/tests/QtCore/qstorageinfo_test.py index 783b59564..c7ae14877 100644 --- a/sources/pyside2/tests/QtCore/qstorageinfo_test.py +++ b/sources/pyside2/tests/QtCore/qstorageinfo_test.py @@ -30,8 +30,14 @@ '''Unit tests for QStorageInfo''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QStorageInfo class QandardPathsTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qstring_test.py b/sources/pyside2/tests/QtCore/qstring_test.py index 95900bc2f..c415fdc3d 100644 --- a/sources/pyside2/tests/QtCore/qstring_test.py +++ b/sources/pyside2/tests/QtCore/qstring_test.py @@ -35,7 +35,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k from PySide2.QtCore import QObject diff --git a/sources/pyside2/tests/QtCore/qsysinfo_test.py b/sources/pyside2/tests/QtCore/qsysinfo_test.py index 7e25e4fe9..0f53a9cfa 100644 --- a/sources/pyside2/tests/QtCore/qsysinfo_test.py +++ b/sources/pyside2/tests/QtCore/qsysinfo_test.py @@ -26,7 +26,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QSysInfo class TestQSysInfo(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qtext_codec_test.py b/sources/pyside2/tests/QtCore/qtext_codec_test.py index 5506c202a..9e41c38c6 100644 --- a/sources/pyside2/tests/QtCore/qtext_codec_test.py +++ b/sources/pyside2/tests/QtCore/qtext_codec_test.py @@ -27,8 +27,14 @@ ############################################################################# import gc +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QTextCodec class TestCodecGetters(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qtextstream_test.py b/sources/pyside2/tests/QtCore/qtextstream_test.py index a5a587d38..bd25367c3 100644 --- a/sources/pyside2/tests/QtCore/qtextstream_test.py +++ b/sources/pyside2/tests/QtCore/qtextstream_test.py @@ -32,7 +32,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qthread_prod_cons_test.py b/sources/pyside2/tests/QtCore/qthread_prod_cons_test.py index ee3ed1a4a..9ff62c156 100644 --- a/sources/pyside2/tests/QtCore/qthread_prod_cons_test.py +++ b/sources/pyside2/tests/QtCore/qthread_prod_cons_test.py @@ -30,9 +30,15 @@ '''Producer-Consumer test/example with QThread''' -import unittest -from random import random import logging +import os +from random import random +import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) logging.basicConfig(level=logging.WARNING) diff --git a/sources/pyside2/tests/QtCore/qthread_signal_test.py b/sources/pyside2/tests/QtCore/qthread_signal_test.py index 31b148a00..bb3423bd7 100644 --- a/sources/pyside2/tests/QtCore/qthread_signal_test.py +++ b/sources/pyside2/tests/QtCore/qthread_signal_test.py @@ -28,8 +28,14 @@ '''Test cases for connecting signals between threads''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QThread, QObject, SIGNAL, QCoreApplication thread_run = False diff --git a/sources/pyside2/tests/QtCore/qthread_test.py b/sources/pyside2/tests/QtCore/qthread_test.py index 73683e50f..2ba5a536c 100644 --- a/sources/pyside2/tests/QtCore/qthread_test.py +++ b/sources/pyside2/tests/QtCore/qthread_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QThread, QCoreApplication, QObject, SIGNAL, QMutex, QTimer from PySide2.QtCore import QEventLoop diff --git a/sources/pyside2/tests/QtCore/qtimer_singleshot_test.py b/sources/pyside2/tests/QtCore/qtimer_singleshot_test.py index 9b2a1567f..41fe4ac97 100644 --- a/sources/pyside2/tests/QtCore/qtimer_singleshot_test.py +++ b/sources/pyside2/tests/QtCore/qtimer_singleshot_test.py @@ -34,7 +34,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, QTimer, QCoreApplication, Signal from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/QtCore/qtimer_timeout_test.py b/sources/pyside2/tests/QtCore/qtimer_timeout_test.py index 54ff63bc2..4f038ddf1 100644 --- a/sources/pyside2/tests/QtCore/qtimer_timeout_test.py +++ b/sources/pyside2/tests/QtCore/qtimer_timeout_test.py @@ -32,7 +32,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, QTimer, SIGNAL from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/QtCore/qtimezone_test.py b/sources/pyside2/tests/QtCore/qtimezone_test.py index 3b9512bea..8c960371f 100644 --- a/sources/pyside2/tests/QtCore/qtimezone_test.py +++ b/sources/pyside2/tests/QtCore/qtimezone_test.py @@ -30,7 +30,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QTimeZone import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/qtnamespace_test.py b/sources/pyside2/tests/QtCore/qtnamespace_test.py index 06dece280..fbf92b6d0 100644 --- a/sources/pyside2/tests/QtCore/qtnamespace_test.py +++ b/sources/pyside2/tests/QtCore/qtnamespace_test.py @@ -30,8 +30,14 @@ '''Test suite for QtCore.Qt namespace''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import Qt class QtNamespace(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qurl_test.py b/sources/pyside2/tests/QtCore/qurl_test.py index b0333d534..8c2b43e9a 100644 --- a/sources/pyside2/tests/QtCore/qurl_test.py +++ b/sources/pyside2/tests/QtCore/qurl_test.py @@ -30,8 +30,14 @@ '''Test suite for QtCore.QUrl''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QUrl from PySide2.QtCore import QUrlQuery diff --git a/sources/pyside2/tests/QtCore/qurlquery_test.py b/sources/pyside2/tests/QtCore/qurlquery_test.py index 652a9a88b..ac7ab69b0 100644 --- a/sources/pyside2/tests/QtCore/qurlquery_test.py +++ b/sources/pyside2/tests/QtCore/qurlquery_test.py @@ -30,9 +30,14 @@ '''Unit tests for QUrlQuery''' -import unittest import ctypes +import os import sys +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QUrlQuery diff --git a/sources/pyside2/tests/QtCore/quuid_test.py b/sources/pyside2/tests/QtCore/quuid_test.py index c881383e5..da34429f9 100644 --- a/sources/pyside2/tests/QtCore/quuid_test.py +++ b/sources/pyside2/tests/QtCore/quuid_test.py @@ -30,8 +30,14 @@ '''Unit tests for QUuid''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QUuid class QUuidTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/qversionnumber_test.py b/sources/pyside2/tests/QtCore/qversionnumber_test.py index d98e320f1..e0d734eec 100644 --- a/sources/pyside2/tests/QtCore/qversionnumber_test.py +++ b/sources/pyside2/tests/QtCore/qversionnumber_test.py @@ -30,8 +30,14 @@ '''Unit tests for QVersionNumber''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QVersionNumber class QVersionNumberTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/repr_test.py b/sources/pyside2/tests/QtCore/repr_test.py index 4bac44c2a..71bab8330 100644 --- a/sources/pyside2/tests/QtCore/repr_test.py +++ b/sources/pyside2/tests/QtCore/repr_test.py @@ -30,7 +30,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import PySide2 from PySide2.QtCore import QByteArray, QDate, QDateTime, QTime, QLine, QLineF diff --git a/sources/pyside2/tests/QtCore/setprop_on_ctor_test.py b/sources/pyside2/tests/QtCore/setprop_on_ctor_test.py index ea3690f91..e149f8ffb 100644 --- a/sources/pyside2/tests/QtCore/setprop_on_ctor_test.py +++ b/sources/pyside2/tests/QtCore/setprop_on_ctor_test.py @@ -28,7 +28,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtCore/staticMetaObject_test.py b/sources/pyside2/tests/QtCore/staticMetaObject_test.py index 7fdfaf417..bb5c5d189 100644 --- a/sources/pyside2/tests/QtCore/staticMetaObject_test.py +++ b/sources/pyside2/tests/QtCore/staticMetaObject_test.py @@ -26,8 +26,14 @@ ## ############################################################################# +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QObject, Slot, QMetaObject class MyObject(QObject): diff --git a/sources/pyside2/tests/QtCore/static_method_test.py b/sources/pyside2/tests/QtCore/static_method_test.py index 28189df4c..e3a7e1798 100644 --- a/sources/pyside2/tests/QtCore/static_method_test.py +++ b/sources/pyside2/tests/QtCore/static_method_test.py @@ -31,8 +31,13 @@ '''Test cases for overloads involving static and non-static versions of a method.''' import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QFile class StaticNonStaticMethodsTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/thread_signals_test.py b/sources/pyside2/tests/QtCore/thread_signals_test.py index 9800d2e09..61cbcc53f 100644 --- a/sources/pyside2/tests/QtCore/thread_signals_test.py +++ b/sources/pyside2/tests/QtCore/thread_signals_test.py @@ -32,7 +32,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) from PySide2.QtCore import QObject, SIGNAL, QFile, QThread, QTimer, Qt from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/QtCore/tr_noop_test.py b/sources/pyside2/tests/QtCore/tr_noop_test.py index 42cf4a525..369db9fc9 100644 --- a/sources/pyside2/tests/QtCore/tr_noop_test.py +++ b/sources/pyside2/tests/QtCore/tr_noop_test.py @@ -26,9 +26,14 @@ ## ############################################################################# +import os +import sys import unittest -import sys +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QT_TR_NOOP, QT_TR_NOOP_UTF8 from PySide2.QtCore import QT_TRANSLATE_NOOP, QT_TRANSLATE_NOOP3, QT_TRANSLATE_NOOP_UTF8 diff --git a/sources/pyside2/tests/QtCore/translation_test.py b/sources/pyside2/tests/QtCore/translation_test.py index 1dfeedeef..0f36067bd 100644 --- a/sources/pyside2/tests/QtCore/translation_test.py +++ b/sources/pyside2/tests/QtCore/translation_test.py @@ -35,7 +35,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k from PySide2.QtCore import QObject, QTranslator, QCoreApplication diff --git a/sources/pyside2/tests/QtCore/unaryoperator_test.py b/sources/pyside2/tests/QtCore/unaryoperator_test.py index ea5813a5f..2fd06cd4b 100644 --- a/sources/pyside2/tests/QtCore/unaryoperator_test.py +++ b/sources/pyside2/tests/QtCore/unaryoperator_test.py @@ -30,8 +30,14 @@ '''Tests the presence of unary operator __neg__ on the QPoint class''' +import os +import sys import unittest +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + from PySide2.QtCore import QPoint class NegUnaryOperatorTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtCore/unicode_test.py b/sources/pyside2/tests/QtCore/unicode_test.py index 3dee24f47..3f1a4d8dc 100644 --- a/sources/pyside2/tests/QtCore/unicode_test.py +++ b/sources/pyside2/tests/QtCore/unicode_test.py @@ -35,7 +35,9 @@ import os import sys import unittest -sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "util")) +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtCore/versioninfo_test.py b/sources/pyside2/tests/QtCore/versioninfo_test.py index 6fff9710f..c682dbbdc 100644 --- a/sources/pyside2/tests/QtCore/versioninfo_test.py +++ b/sources/pyside2/tests/QtCore/versioninfo_test.py @@ -26,7 +26,14 @@ ## ############################################################################# +import os +import sys import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(False) + import PySide2 class TestVersionInfo(unittest.TestCase): |