From 4a8a2713433154aee21f1f83ef3e9e7dc9466275 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 12 Feb 2020 09:44:04 +0100 Subject: Fix running the PySide2 tests for Python 3.8/Windows On Windows, DLL directories can no longer be specified via the PATH environment variable. They need to be added via os.add_dll_directory(). In order to fix this, move the entire environment setup from CMake to a python helper and set the environment variables BUILD_DIR and QT_DIR pointing to the build directory and Qt directory, respectively, from CMake. In addition, this has a huge advantage: The tests can also be executed much more easily without ctest from the command line by just setting BUILD_DIR and QT_DIR instead of a complex manipulation of PATH/LD_LIBRARY_PATH. Change-Id: I7d518ccab19ca184c3112a126c779d4a6d7c6c5e Reviewed-by: Qt CI Bot Reviewed-by: Christian Tismer Reviewed-by: Cristian Maureira-Fredes --- sources/pyside2/tests/CMakeLists.txt | 24 ++--- .../pyside2/tests/Qt3DExtras/qt3dextras_test.py | 4 +- sources/pyside2/tests/QtCharts/qcharts_test.py | 4 +- sources/pyside2/tests/QtCore/attr_cache_py3k.py | 8 ++ .../pyside2/tests/QtCore/blocking_signals_test.py | 7 +- sources/pyside2/tests/QtCore/bug_1019.py | 7 ++ sources/pyside2/tests/QtCore/bug_1031.py | 8 ++ sources/pyside2/tests/QtCore/bug_1063.py | 4 +- sources/pyside2/tests/QtCore/bug_1069.py | 10 +- sources/pyside2/tests/QtCore/bug_278_test.py | 6 ++ sources/pyside2/tests/QtCore/bug_332.py | 7 ++ sources/pyside2/tests/QtCore/bug_408.py | 6 ++ sources/pyside2/tests/QtCore/bug_428.py | 6 ++ sources/pyside2/tests/QtCore/bug_462.py | 7 +- sources/pyside2/tests/QtCore/bug_505.py | 6 ++ sources/pyside2/tests/QtCore/bug_515.py | 8 ++ sources/pyside2/tests/QtCore/bug_606.py | 6 ++ sources/pyside2/tests/QtCore/bug_656.py | 8 ++ sources/pyside2/tests/QtCore/bug_686.py | 7 ++ sources/pyside2/tests/QtCore/bug_699.py | 7 ++ sources/pyside2/tests/QtCore/bug_706.py | 6 ++ sources/pyside2/tests/QtCore/bug_820.py | 6 ++ sources/pyside2/tests/QtCore/bug_826.py | 9 +- sources/pyside2/tests/QtCore/bug_829.py | 9 +- sources/pyside2/tests/QtCore/bug_835.py | 9 +- sources/pyside2/tests/QtCore/bug_920.py | 6 ++ sources/pyside2/tests/QtCore/bug_927.py | 6 ++ sources/pyside2/tests/QtCore/bug_931.py | 6 ++ sources/pyside2/tests/QtCore/bug_938.py | 4 +- sources/pyside2/tests/QtCore/bug_953.py | 8 ++ sources/pyside2/tests/QtCore/bug_987.py | 10 +- sources/pyside2/tests/QtCore/bug_994.py | 4 +- sources/pyside2/tests/QtCore/bug_PYSIDE-164.py | 6 ++ sources/pyside2/tests/QtCore/bug_PYSIDE-42.py | 10 +- sources/pyside2/tests/QtCore/child_event_test.py | 4 +- sources/pyside2/tests/QtCore/classinfo_test.py | 6 ++ sources/pyside2/tests/QtCore/deepcopy_test.py | 4 +- sources/pyside2/tests/QtCore/deletelater_test.py | 4 +- sources/pyside2/tests/QtCore/destroysignal_test.py | 9 +- sources/pyside2/tests/QtCore/duck_punching_test.py | 4 +- sources/pyside2/tests/QtCore/emoji_string_test.py | 7 ++ sources/pyside2/tests/QtCore/hash_test.py | 7 ++ sources/pyside2/tests/QtCore/inherits_test.py | 6 ++ sources/pyside2/tests/QtCore/max_signals.py | 6 ++ .../pyside2/tests/QtCore/missing_symbols_test.py | 7 ++ sources/pyside2/tests/QtCore/mockclass_test.py | 7 ++ sources/pyside2/tests/QtCore/python_conversion.py | 7 ++ sources/pyside2/tests/QtCore/qabs_test.py | 6 ++ .../tests/QtCore/qabstractitemmodel_test.py | 7 ++ .../tests/QtCore/qabstracttransition_test.py | 9 +- .../pyside2/tests/QtCore/qanimationgroup_test.py | 7 ++ sources/pyside2/tests/QtCore/qbitarray_test.py | 6 ++ .../QtCore/qbytearray_buffer_protocol_test.py | 4 +- .../qbytearray_concatenation_operator_test.py | 4 +- .../tests/QtCore/qbytearray_operator_iadd_test.py | 4 +- .../tests/QtCore/qbytearray_operator_test.py | 4 +- sources/pyside2/tests/QtCore/qbytearray_test.py | 4 +- sources/pyside2/tests/QtCore/qcalendar_test.py | 6 ++ sources/pyside2/tests/QtCore/qcbor_test.py | 6 ++ sources/pyside2/tests/QtCore/qcollator_test.py | 7 +- .../tests/QtCore/qcommandlineparser_test.py | 7 +- .../tests/QtCore/qcoreapplication_instance_test.py | 6 ++ .../pyside2/tests/QtCore/qcoreapplication_test.py | 6 ++ sources/pyside2/tests/QtCore/qdatastream_test.py | 4 +- sources/pyside2/tests/QtCore/qdate_test.py | 6 ++ sources/pyside2/tests/QtCore/qdatetime_test.py | 8 +- sources/pyside2/tests/QtCore/qeasingcurve_test.py | 6 ++ sources/pyside2/tests/QtCore/qenum_test.py | 6 ++ sources/pyside2/tests/QtCore/qevent_test.py | 6 ++ sources/pyside2/tests/QtCore/qfile_test.py | 4 +- sources/pyside2/tests/QtCore/qfileinfo_test.py | 8 +- sources/pyside2/tests/QtCore/qfileread_test.py | 4 +- sources/pyside2/tests/QtCore/qflags_test.py | 7 ++ sources/pyside2/tests/QtCore/qhandle_test.py | 6 ++ .../tests/QtCore/qinstallmsghandler_test.py | 7 +- sources/pyside2/tests/QtCore/qjsondocument_test.py | 4 +- sources/pyside2/tests/QtCore/qlinef_test.py | 7 +- sources/pyside2/tests/QtCore/qlocale_test.py | 7 +- sources/pyside2/tests/QtCore/qlockfile_test.py | 9 +- .../QtCore/qmessageauthenticationcode_test.py | 4 +- sources/pyside2/tests/QtCore/qmetaobject_test.py | 6 ++ sources/pyside2/tests/QtCore/qmimedatabase_test.py | 7 +- .../QtCore/qmodelindex_internalpointer_test.py | 6 ++ .../tests/QtCore/qobject_children_segfault_test.py | 6 ++ .../tests/QtCore/qobject_connect_notify_test.py | 4 +- sources/pyside2/tests/QtCore/qobject_destructor.py | 6 ++ .../tests/QtCore/qobject_event_filter_test.py | 4 +- .../pyside2/tests/QtCore/qobject_inherits_test.py | 7 +- .../tests/QtCore/qobject_objectproperty_test.py | 7 ++ .../pyside2/tests/QtCore/qobject_parent_test.py | 8 +- .../pyside2/tests/QtCore/qobject_property_test.py | 6 ++ .../tests/QtCore/qobject_protected_methods_test.py | 6 ++ sources/pyside2/tests/QtCore/qobject_test.py | 4 +- .../tests/QtCore/qobject_timer_event_test.py | 4 +- .../tests/QtCore/qobject_tr_as_instance_test.py | 4 +- .../tests/QtCore/qoperatingsystemversion_test.py | 7 ++ sources/pyside2/tests/QtCore/qpoint_test.py | 6 ++ sources/pyside2/tests/QtCore/qprocess_test.py | 4 +- .../pyside2/tests/QtCore/qproperty_decorator.py | 8 +- .../pyside2/tests/QtCore/qrandomgenerator_test.py | 6 ++ sources/pyside2/tests/QtCore/qrect_test.py | 6 ++ sources/pyside2/tests/QtCore/qregexp_test.py | 7 ++ .../tests/QtCore/qregularexpression_test.py | 7 ++ sources/pyside2/tests/QtCore/qresource_test.py | 4 +- sources/pyside2/tests/QtCore/qsettings_test.py | 4 +- sources/pyside2/tests/QtCore/qsize_test.py | 6 ++ sources/pyside2/tests/QtCore/qslot_object_test.py | 6 ++ .../pyside2/tests/QtCore/qsocketnotifier_test.py | 11 ++- sources/pyside2/tests/QtCore/qsrand_test.py | 6 ++ .../pyside2/tests/QtCore/qstandardpaths_test.py | 7 +- sources/pyside2/tests/QtCore/qstate_test.py | 7 ++ sources/pyside2/tests/QtCore/qstatemachine_test.py | 4 +- sources/pyside2/tests/QtCore/qstorageinfo_test.py | 6 ++ sources/pyside2/tests/QtCore/qstring_test.py | 4 +- sources/pyside2/tests/QtCore/qsysinfo_test.py | 7 ++ sources/pyside2/tests/QtCore/qtext_codec_test.py | 6 ++ sources/pyside2/tests/QtCore/qtextstream_test.py | 4 +- .../pyside2/tests/QtCore/qthread_prod_cons_test.py | 10 +- .../pyside2/tests/QtCore/qthread_signal_test.py | 6 ++ sources/pyside2/tests/QtCore/qthread_test.py | 4 +- .../pyside2/tests/QtCore/qtimer_singleshot_test.py | 4 +- .../pyside2/tests/QtCore/qtimer_timeout_test.py | 4 +- sources/pyside2/tests/QtCore/qtimezone_test.py | 4 +- sources/pyside2/tests/QtCore/qtnamespace_test.py | 6 ++ sources/pyside2/tests/QtCore/qurl_test.py | 6 ++ sources/pyside2/tests/QtCore/qurlquery_test.py | 7 +- sources/pyside2/tests/QtCore/quuid_test.py | 6 ++ .../pyside2/tests/QtCore/qversionnumber_test.py | 6 ++ sources/pyside2/tests/QtCore/repr_test.py | 4 +- .../pyside2/tests/QtCore/setprop_on_ctor_test.py | 7 ++ .../pyside2/tests/QtCore/staticMetaObject_test.py | 6 ++ sources/pyside2/tests/QtCore/static_method_test.py | 5 + .../pyside2/tests/QtCore/thread_signals_test.py | 4 +- sources/pyside2/tests/QtCore/tr_noop_test.py | 7 +- sources/pyside2/tests/QtCore/translation_test.py | 4 +- sources/pyside2/tests/QtCore/unaryoperator_test.py | 6 ++ sources/pyside2/tests/QtCore/unicode_test.py | 4 +- sources/pyside2/tests/QtCore/versioninfo_test.py | 7 ++ .../QtDataVisualization/datavisualization_test.py | 4 +- sources/pyside2/tests/QtGui/bug_1091.py | 7 ++ sources/pyside2/tests/QtGui/bug_300_test.py | 10 +- sources/pyside2/tests/QtGui/bug_367.py | 4 +- sources/pyside2/tests/QtGui/bug_480.py | 6 ++ sources/pyside2/tests/QtGui/bug_606.py | 6 ++ sources/pyside2/tests/QtGui/bug_617.py | 10 +- sources/pyside2/tests/QtGui/bug_652.py | 9 +- sources/pyside2/tests/QtGui/bug_660.py | 4 +- sources/pyside2/tests/QtGui/bug_716.py | 8 ++ sources/pyside2/tests/QtGui/bug_740.py | 4 +- sources/pyside2/tests/QtGui/bug_743.py | 6 ++ sources/pyside2/tests/QtGui/bug_991.py | 7 ++ sources/pyside2/tests/QtGui/bug_PYSIDE-344.py | 6 ++ sources/pyside2/tests/QtGui/bug_PYSIDE-41.py | 6 ++ sources/pyside2/tests/QtGui/deepcopy_test.py | 8 +- .../QtGui/float_to_int_implicit_conversion_test.py | 4 +- sources/pyside2/tests/QtGui/pyside_reload_test.py | 4 +- sources/pyside2/tests/QtGui/qcolor_reduce_test.py | 9 +- sources/pyside2/tests/QtGui/qcolor_test.py | 10 +- sources/pyside2/tests/QtGui/qcursor_test.py | 4 +- .../tests/QtGui/qdatastream_gui_operators_test.py | 4 +- .../pyside2/tests/QtGui/qdesktopservices_test.py | 6 ++ sources/pyside2/tests/QtGui/qfontmetrics_test.py | 4 +- .../pyside2/tests/QtGui/qguiapplication_test.py | 6 ++ sources/pyside2/tests/QtGui/qicon_test.py | 4 +- sources/pyside2/tests/QtGui/qitemselection_test.py | 4 +- sources/pyside2/tests/QtGui/qkeysequence_test.py | 4 +- sources/pyside2/tests/QtGui/qmatrix_test.py | 6 ++ sources/pyside2/tests/QtGui/qopenglbuffer_test.py | 4 +- sources/pyside2/tests/QtGui/qopenglwindow_test.py | 4 +- sources/pyside2/tests/QtGui/qpainter_test.py | 6 ++ sources/pyside2/tests/QtGui/qpdfwriter_test.py | 4 +- sources/pyside2/tests/QtGui/qpixelformat_test.py | 4 +- sources/pyside2/tests/QtGui/qpixmap_test.py | 4 +- sources/pyside2/tests/QtGui/qpixmapcache_test.py | 4 +- sources/pyside2/tests/QtGui/qpolygonf_test.py | 7 ++ .../pyside2/tests/QtGui/qradialgradient_test.py | 6 ++ sources/pyside2/tests/QtGui/qrasterwindow_test.py | 4 +- sources/pyside2/tests/QtGui/qregion_test.py | 4 +- sources/pyside2/tests/QtGui/qstylehints_test.py | 4 +- .../pyside2/tests/QtGui/qtextdocument_functions.py | 6 ++ .../tests/QtGui/qtextdocument_undoredo_test.py | 6 ++ .../tests/QtGui/qtextdocumentwriter_test.py | 4 +- sources/pyside2/tests/QtGui/qtextline_test.py | 4 +- sources/pyside2/tests/QtGui/qtransform_test.py | 7 ++ sources/pyside2/tests/QtGui/repr_test.py | 6 ++ .../tests/QtGui/timed_app_and_patching_test.py | 4 +- sources/pyside2/tests/QtHelp/help_test.py | 4 +- .../pyside2/tests/QtHelp/helpsearchengine_test.py | 4 +- sources/pyside2/tests/QtLocation/location.py | 10 +- sources/pyside2/tests/QtMultimedia/audio_test.py | 4 +- .../QtMultimediaWidgets/qmultimediawidgets.py | 4 +- .../pyside2/tests/QtNetwork/accessManager_test.py | 4 +- sources/pyside2/tests/QtNetwork/bug_1084.py | 4 +- sources/pyside2/tests/QtNetwork/bug_446.py | 4 +- sources/pyside2/tests/QtNetwork/dnslookup_test.py | 6 ++ .../pyside2/tests/QtNetwork/qipv6address_test.py | 6 ++ .../tests/QtNetwork/qpassworddigestor_test.py | 6 ++ sources/pyside2/tests/QtNetwork/tcpserver_test.py | 6 ++ sources/pyside2/tests/QtNetwork/udpsocket_test.py | 4 +- sources/pyside2/tests/QtOpenGL/qglbuffer_test.py | 4 +- sources/pyside2/tests/QtOpenGL/qglwidget_test.py | 7 ++ sources/pyside2/tests/QtPositioning/positioning.py | 10 +- sources/pyside2/tests/QtPrintSupport/bug_500.py | 4 +- .../returnquadruplesofnumbers_test.py | 4 +- sources/pyside2/tests/QtQml/bug_1029.py | 8 +- sources/pyside2/tests/QtQml/bug_451.py | 4 +- sources/pyside2/tests/QtQml/bug_456.py | 4 +- sources/pyside2/tests/QtQml/bug_557.py | 4 +- sources/pyside2/tests/QtQml/bug_726.py | 4 +- sources/pyside2/tests/QtQml/bug_814.py | 4 +- sources/pyside2/tests/QtQml/bug_825.py | 4 +- sources/pyside2/tests/QtQml/bug_847.py | 4 +- sources/pyside2/tests/QtQml/bug_915.py | 4 +- sources/pyside2/tests/QtQml/bug_926.py | 4 +- sources/pyside2/tests/QtQml/bug_951.py | 4 +- sources/pyside2/tests/QtQml/bug_995.py | 4 +- sources/pyside2/tests/QtQml/bug_997.py | 4 +- sources/pyside2/tests/QtQml/connect_python_qml.py | 4 +- .../pyside2/tests/QtQml/javascript_exceptions.py | 4 +- .../tests/QtQml/qqmlincubator_incubateWhile.py | 4 +- sources/pyside2/tests/QtQml/qqmlnetwork_test.py | 4 +- .../pyside2/tests/QtQml/qquickitem_grabToImage.py | 4 +- sources/pyside2/tests/QtQml/qquickview_test.py | 4 +- sources/pyside2/tests/QtQml/registertype.py | 4 +- sources/pyside2/tests/QtQml/signal_arguments.py | 4 +- sources/pyside2/tests/QtScript/base_test.py | 7 ++ sources/pyside2/tests/QtScript/bug_1022.py | 6 ++ sources/pyside2/tests/QtScript/engine_test.py | 6 ++ sources/pyside2/tests/QtScript/property_test.py | 6 ++ .../pyside2/tests/QtScript/qscriptvalue_test.py | 4 +- .../pyside2/tests/QtScriptTools/debugger_test.py | 4 +- sources/pyside2/tests/QtScxml/test_dynamic.py | 4 +- sources/pyside2/tests/QtSensors/sensors.py | 10 +- sources/pyside2/tests/QtSql/bug_1013.py | 10 +- .../tests/QtSql/qsqldatabaseandqueries_test.py | 6 ++ sources/pyside2/tests/QtSql/qvarianttype_test.py | 4 +- sources/pyside2/tests/QtSvg/qsvggenerator_test.py | 9 +- sources/pyside2/tests/QtSvg/qsvgrenderer_test.py | 9 +- sources/pyside2/tests/QtSvg/qsvgwidget_test.py | 9 +- sources/pyside2/tests/QtTest/click_test.py | 4 +- sources/pyside2/tests/QtTest/eventfilter_test.py | 4 +- sources/pyside2/tests/QtTest/qvalidator_test.py | 4 +- sources/pyside2/tests/QtTest/touchevent_test.py | 4 +- .../tests/QtTextToSpeech/qtexttospeech_test.py | 4 +- sources/pyside2/tests/QtUiTools/bug_1060.py | 4 +- sources/pyside2/tests/QtUiTools/bug_360.py | 4 +- sources/pyside2/tests/QtUiTools/bug_376.py | 4 +- sources/pyside2/tests/QtUiTools/bug_392.py | 4 +- sources/pyside2/tests/QtUiTools/bug_426.py | 8 +- sources/pyside2/tests/QtUiTools/bug_552.py | 4 +- sources/pyside2/tests/QtUiTools/bug_797.py | 4 +- sources/pyside2/tests/QtUiTools/bug_909.py | 4 +- sources/pyside2/tests/QtUiTools/bug_913.py | 4 +- sources/pyside2/tests/QtUiTools/bug_958.py | 4 +- sources/pyside2/tests/QtUiTools/bug_965.py | 7 +- sources/pyside2/tests/QtUiTools/ui_test.py | 4 +- sources/pyside2/tests/QtUiTools/uiloader_test.py | 4 +- .../tests/QtWebEngine/web_engine_initialize.py | 6 ++ .../QtWebEngineCore/web_engine_custom_scheme.py | 4 +- .../pyside-474-qtwebengineview.py | 6 ++ sources/pyside2/tests/QtWebKit/bug_448.py | 7 +- sources/pyside2/tests/QtWebKit/bug_694.py | 6 ++ sources/pyside2/tests/QtWebKit/bug_803.py | 7 ++ sources/pyside2/tests/QtWebKit/bug_899.py | 4 +- sources/pyside2/tests/QtWebKit/bug_959.py | 4 +- sources/pyside2/tests/QtWebKit/qml_plugin_test.py | 4 +- .../tests/QtWebKit/qvariantlist_property_test.py | 4 +- .../QtWebKit/shouldInterruptjavascript_test.py | 4 +- sources/pyside2/tests/QtWebKit/webframe_test.py | 4 +- sources/pyside2/tests/QtWebKit/webpage_test.py | 4 +- sources/pyside2/tests/QtWebKit/webview_test.py | 4 +- sources/pyside2/tests/QtWidgets/action_clear.py | 4 +- sources/pyside2/tests/QtWidgets/add_action_test.py | 4 +- sources/pyside2/tests/QtWidgets/api2_test.py | 4 +- .../pyside2/tests/QtWidgets/application_test.py | 7 ++ sources/pyside2/tests/QtWidgets/bug_1002.py | 4 +- sources/pyside2/tests/QtWidgets/bug_1006.py | 4 +- sources/pyside2/tests/QtWidgets/bug_1048.py | 8 ++ sources/pyside2/tests/QtWidgets/bug_1077.py | 11 ++- sources/pyside2/tests/QtWidgets/bug_172.py | 8 ++ sources/pyside2/tests/QtWidgets/bug_243.py | 7 +- sources/pyside2/tests/QtWidgets/bug_307.py | 8 +- sources/pyside2/tests/QtWidgets/bug_324.py | 9 +- sources/pyside2/tests/QtWidgets/bug_338.py | 5 + sources/pyside2/tests/QtWidgets/bug_363.py | 4 +- sources/pyside2/tests/QtWidgets/bug_389.py | 4 +- sources/pyside2/tests/QtWidgets/bug_400.py | 4 +- sources/pyside2/tests/QtWidgets/bug_416.py | 4 +- sources/pyside2/tests/QtWidgets/bug_429.py | 10 +- sources/pyside2/tests/QtWidgets/bug_430.py | 7 ++ sources/pyside2/tests/QtWidgets/bug_433.py | 6 ++ sources/pyside2/tests/QtWidgets/bug_467.py | 4 +- sources/pyside2/tests/QtWidgets/bug_493.py | 9 +- sources/pyside2/tests/QtWidgets/bug_512.py | 4 +- sources/pyside2/tests/QtWidgets/bug_525.py | 7 ++ sources/pyside2/tests/QtWidgets/bug_546.py | 7 ++ sources/pyside2/tests/QtWidgets/bug_547.py | 6 ++ sources/pyside2/tests/QtWidgets/bug_549.py | 6 ++ sources/pyside2/tests/QtWidgets/bug_569.py | 9 +- sources/pyside2/tests/QtWidgets/bug_575.py | 10 +- sources/pyside2/tests/QtWidgets/bug_576.py | 6 ++ sources/pyside2/tests/QtWidgets/bug_585.py | 5 + sources/pyside2/tests/QtWidgets/bug_589.py | 9 +- sources/pyside2/tests/QtWidgets/bug_632.py | 8 +- sources/pyside2/tests/QtWidgets/bug_635.py | 9 +- sources/pyside2/tests/QtWidgets/bug_640.py | 9 +- sources/pyside2/tests/QtWidgets/bug_653.py | 9 +- sources/pyside2/tests/QtWidgets/bug_662.py | 6 ++ sources/pyside2/tests/QtWidgets/bug_667.py | 6 ++ sources/pyside2/tests/QtWidgets/bug_668.py | 9 +- sources/pyside2/tests/QtWidgets/bug_674.py | 11 ++- sources/pyside2/tests/QtWidgets/bug_675.py | 8 ++ sources/pyside2/tests/QtWidgets/bug_688.py | 4 +- sources/pyside2/tests/QtWidgets/bug_693.py | 10 +- sources/pyside2/tests/QtWidgets/bug_696.py | 4 +- sources/pyside2/tests/QtWidgets/bug_711.py | 7 ++ sources/pyside2/tests/QtWidgets/bug_714.py | 8 +- sources/pyside2/tests/QtWidgets/bug_722.py | 4 +- sources/pyside2/tests/QtWidgets/bug_728.py | 8 ++ sources/pyside2/tests/QtWidgets/bug_736.py | 6 ++ sources/pyside2/tests/QtWidgets/bug_750.py | 4 +- sources/pyside2/tests/QtWidgets/bug_778.py | 4 +- sources/pyside2/tests/QtWidgets/bug_785.py | 7 +- sources/pyside2/tests/QtWidgets/bug_793.py | 8 +- sources/pyside2/tests/QtWidgets/bug_811.py | 4 +- sources/pyside2/tests/QtWidgets/bug_834.py | 8 ++ sources/pyside2/tests/QtWidgets/bug_836.py | 8 ++ sources/pyside2/tests/QtWidgets/bug_844.py | 8 ++ sources/pyside2/tests/QtWidgets/bug_854.py | 4 +- sources/pyside2/tests/QtWidgets/bug_860.py | 4 +- sources/pyside2/tests/QtWidgets/bug_862.py | 9 +- sources/pyside2/tests/QtWidgets/bug_871.py | 4 +- sources/pyside2/tests/QtWidgets/bug_879.py | 6 ++ sources/pyside2/tests/QtWidgets/bug_919.py | 4 +- sources/pyside2/tests/QtWidgets/bug_921.py | 4 +- sources/pyside2/tests/QtWidgets/bug_941.py | 7 ++ sources/pyside2/tests/QtWidgets/bug_964.py | 7 ++ sources/pyside2/tests/QtWidgets/bug_967.py | 7 ++ sources/pyside2/tests/QtWidgets/bug_972.py | 4 +- sources/pyside2/tests/QtWidgets/bug_979.py | 8 ++ sources/pyside2/tests/QtWidgets/bug_988.py | 7 ++ sources/pyside2/tests/QtWidgets/bug_998.py | 7 ++ .../tests/QtWidgets/customproxywidget_test.py | 4 +- .../pyside2/tests/QtWidgets/event_filter_test.py | 4 +- .../tests/QtWidgets/grandparent_method_test.py | 4 +- .../pyside2/tests/QtWidgets/hashabletype_test.py | 4 +- .../pyside2/tests/QtWidgets/keep_reference_test.py | 4 +- .../tests/QtWidgets/missing_symbols_test.py | 7 ++ .../pyside2/tests/QtWidgets/paint_event_test.py | 4 +- .../pyside2/tests/QtWidgets/parent_method_test.py | 4 +- .../pyside2/tests/QtWidgets/private_mangle_test.py | 7 ++ .../tests/QtWidgets/python_properties_test.py | 6 ++ .../QtWidgets/qabstracttextdocumentlayout_test.py | 4 +- sources/pyside2/tests/QtWidgets/qaction_test.py | 4 +- sources/pyside2/tests/QtWidgets/qapp_issue_585.py | 8 ++ sources/pyside2/tests/QtWidgets/qapp_test.py | 6 ++ .../QtWidgets/qapplication_exit_segfault_test.py | 7 +- .../pyside2/tests/QtWidgets/qapplication_test.py | 6 ++ sources/pyside2/tests/QtWidgets/qbrush_test.py | 4 +- sources/pyside2/tests/QtWidgets/qcolormap_test.py | 4 +- sources/pyside2/tests/QtWidgets/qdynamic_signal.py | 4 +- .../pyside2/tests/QtWidgets/qfontdialog_test.py | 4 +- .../pyside2/tests/QtWidgets/qformlayout_test.py | 4 +- .../QtWidgets/qgraphicsitem_isblocked_test.py | 4 +- .../pyside2/tests/QtWidgets/qgraphicsitem_test.py | 4 +- .../tests/QtWidgets/qgraphicsobjectreimpl_test.py | 4 +- .../tests/QtWidgets/qgraphicsproxywidget_test.py | 4 +- .../pyside2/tests/QtWidgets/qgraphicsscene_test.py | 4 +- sources/pyside2/tests/QtWidgets/qimage_test.py | 4 +- .../tests/QtWidgets/qinputdialog_get_test.py | 4 +- .../tests/QtWidgets/qkeysequenceedit_test.py | 4 +- sources/pyside2/tests/QtWidgets/qlabel_test.py | 6 ++ .../pyside2/tests/QtWidgets/qlayout_ref_test.py | 4 +- sources/pyside2/tests/QtWidgets/qlayout_test.py | 4 +- sources/pyside2/tests/QtWidgets/qlcdnumber_test.py | 6 ++ .../pyside2/tests/QtWidgets/qlistwidget_test.py | 4 +- .../tests/QtWidgets/qlistwidgetitem_test.py | 4 +- .../pyside2/tests/QtWidgets/qmainwindow_test.py | 4 +- sources/pyside2/tests/QtWidgets/qmenu_test.py | 4 +- sources/pyside2/tests/QtWidgets/qmenuadd_test.py | 4 +- sources/pyside2/tests/QtWidgets/qobject_mi_test.py | 4 +- sources/pyside2/tests/QtWidgets/qpen_test.py | 4 +- sources/pyside2/tests/QtWidgets/qpicture_test.py | 4 +- .../pyside2/tests/QtWidgets/qpixmap_constructor.py | 4 +- .../pyside2/tests/QtWidgets/qpushbutton_test.py | 4 +- sources/pyside2/tests/QtWidgets/qshortcut_test.py | 7 +- sources/pyside2/tests/QtWidgets/qsplitter_test.py | 4 +- .../tests/QtWidgets/qstandarditemmodel_test.py | 4 +- .../tests/QtWidgets/qstring_qkeysequence_test.py | 4 +- sources/pyside2/tests/QtWidgets/qstyle_test.py | 4 +- sources/pyside2/tests/QtWidgets/qtableview_test.py | 4 +- sources/pyside2/tests/QtWidgets/qtabwidget_test.py | 4 +- .../tests/QtWidgets/qtabwidgetclear_test.py | 4 +- .../tests/QtWidgets/qtextedit_signal_test.py | 4 +- sources/pyside2/tests/QtWidgets/qtextedit_test.py | 4 +- sources/pyside2/tests/QtWidgets/qtoolbar_test.py | 4 +- sources/pyside2/tests/QtWidgets/qtoolbox_test.py | 4 +- sources/pyside2/tests/QtWidgets/qtreeview_test.py | 4 +- .../pyside2/tests/QtWidgets/qtreewidget_test.py | 4 +- sources/pyside2/tests/QtWidgets/qvariant_test.py | 4 +- .../tests/QtWidgets/qwidget_setlayout_test.py | 4 +- sources/pyside2/tests/QtWidgets/qwidget_test.py | 4 +- .../tests/QtWidgets/reference_count_test.py | 4 +- sources/pyside2/tests/QtWidgets/signature_test.py | 7 ++ .../pyside2/tests/QtWidgets/standardpixmap_test.py | 4 +- .../tests/QtWidgets/test_module_template.py | 8 ++ .../virtual_protected_inheritance_test.py | 4 +- .../tests/QtWidgets/virtual_pure_override_test.py | 4 +- .../pyside2/tests/QtWidgets/wrong_return_test.py | 4 +- sources/pyside2/tests/QtXml/qdomdocument_test.py | 4 +- .../pyside2/tests/QtXml/qxmlsimplereader_test.py | 7 ++ sources/pyside2/tests/QtXmlPatterns/import_test.py | 4 +- sources/pyside2/tests/init_paths.py | 104 +++++++++++++++++++++ sources/pyside2/tests/mac/qmacstyle_test.py | 9 +- .../tests/pysidetest/all_modules_load_test.py | 7 ++ sources/pyside2/tests/pysidetest/bug_1016.py | 10 +- .../pysidetest/constructor_properties_test.py | 4 +- .../pyside2/tests/pysidetest/decoratedslot_test.py | 7 ++ .../tests/pysidetest/delegatecreateseditor_test.py | 8 +- sources/pyside2/tests/pysidetest/embedding_test.py | 6 ++ sources/pyside2/tests/pysidetest/enum_test.py | 7 ++ .../pysidetest/homonymoussignalandmethod_test.py | 7 ++ sources/pyside2/tests/pysidetest/iterable_test.py | 5 + .../pyside2/tests/pysidetest/list_signal_test.py | 7 ++ .../tests/pysidetest/mixin_signal_slots_test.py | 7 ++ sources/pyside2/tests/pysidetest/modelview_test.py | 7 ++ .../pysidetest/new_inherited_functions_test.py | 6 +- sources/pyside2/tests/pysidetest/notify_id.py | 7 ++ .../tests/pysidetest/qapp_like_a_macro_test.py | 7 ++ sources/pyside2/tests/pysidetest/qvariant_test.py | 6 ++ sources/pyside2/tests/pysidetest/repr_test.py | 7 ++ .../tests/pysidetest/signal_slot_warning.py | 10 +- .../tests/pysidetest/signalandnamespace_test.py | 7 ++ .../pysidetest/signalemissionfrompython_test.py | 7 ++ .../pysidetest/signalwithdefaultvalue_test.py | 7 ++ .../tests/pysidetest/typedef_signal_test.py | 6 ++ sources/pyside2/tests/pysidetest/version_test.py | 7 ++ sources/pyside2/tests/registry/existence_test.py | 7 +- .../pyside2/tests/signals/args_dont_match_test.py | 7 ++ sources/pyside2/tests/signals/bug_189.py | 4 +- sources/pyside2/tests/signals/bug_311.py | 4 +- sources/pyside2/tests/signals/bug_312.py | 8 +- sources/pyside2/tests/signals/bug_319.py | 4 +- sources/pyside2/tests/signals/bug_79.py | 9 +- sources/pyside2/tests/signals/decorators_test.py | 6 ++ sources/pyside2/tests/signals/disconnect_test.py | 10 +- .../pyside2/tests/signals/invalid_callback_test.py | 6 ++ sources/pyside2/tests/signals/lambda_gui_test.py | 4 +- sources/pyside2/tests/signals/lambda_test.py | 4 +- .../pyside2/tests/signals/leaking_signal_test.py | 10 +- .../tests/signals/multiple_connections_gui_test.py | 4 +- .../tests/signals/multiple_connections_test.py | 4 +- sources/pyside2/tests/signals/pysignal_test.py | 4 +- .../tests/signals/qobject_destroyed_test.py | 6 ++ .../tests/signals/qobject_receivers_test.py | 7 ++ .../pyside2/tests/signals/qobject_sender_test.py | 4 +- sources/pyside2/tests/signals/ref01_test.py | 7 ++ sources/pyside2/tests/signals/ref02_test.py | 4 +- sources/pyside2/tests/signals/ref03_test.py | 9 +- sources/pyside2/tests/signals/ref04_test.py | 7 ++ sources/pyside2/tests/signals/ref05_test.py | 4 +- sources/pyside2/tests/signals/ref06_test.py | 4 +- .../tests/signals/segfault_proxyparent_test.py | 6 ++ sources/pyside2/tests/signals/self_connect_test.py | 4 +- .../pyside2/tests/signals/short_circuit_test.py | 6 ++ .../tests/signals/signal2signal_connect_test.py | 7 ++ .../tests/signals/signal_autoconnect_test.py | 6 ++ .../signals/signal_connectiontype_support_test.py | 6 ++ .../tests/signals/signal_emission_gui_test.py | 4 +- .../pyside2/tests/signals/signal_emission_test.py | 4 +- sources/pyside2/tests/signals/signal_func_test.py | 6 ++ .../tests/signals/signal_manager_refcount_test.py | 8 ++ .../tests/signals/signal_number_limit_test.py | 7 ++ .../pyside2/tests/signals/signal_object_test.py | 4 +- .../pyside2/tests/signals/signal_signature_test.py | 4 +- .../signals/signal_with_primitive_type_test.py | 7 ++ .../tests/signals/slot_reference_count_test.py | 8 +- .../tests/signals/static_metaobject_test.py | 4 +- sources/pyside2/tests/support/voidptr_test.py | 7 ++ 479 files changed, 2512 insertions(+), 332 deletions(-) create mode 100644 sources/pyside2/tests/init_paths.py diff --git a/sources/pyside2/tests/CMakeLists.txt b/sources/pyside2/tests/CMakeLists.txt index 08585252c..60179d81f 100644 --- a/sources/pyside2/tests/CMakeLists.txt +++ b/sources/pyside2/tests/CMakeLists.txt @@ -5,23 +5,11 @@ else() set(CTEST_TESTING_TIMEOUT 60) endif() - # tests/QtWidgets/qstandarditemmodel_test.py needs shiboken2 - # tests/QtWidgets/qlabel_test.py needs shiboken2 - if(WIN32) - set(TEST_PYTHONPATH "${CMAKE_BINARY_DIR};${CMAKE_SOURCE_DIR}/tests/util;${CMAKE_BINARY_DIR}/tests/pysidetest;${SHIBOKEN_PYTHON_MODULE_DIR};$ENV{PYTHONPATH}") - set(TEST_LIBRARY_PATH "${libpyside_BINARY_DIR};${pysidetest_BINARY_DIR};${SHIBOKEN_SHARED_LIBRARY_DIR};$ENV{PATH}") - set(LIBRARY_PATH_VAR "PATH") - string(REPLACE "\\" "/" TEST_PYTHONPATH "${TEST_PYTHONPATH}") - string(REPLACE "\\" "/" TEST_LIBRARY_PATH "${TEST_LIBRARY_PATH}") - - string(REPLACE ";" "\\;" TEST_PYTHONPATH "${TEST_PYTHONPATH}") - string(REPLACE ";" "\\;" TEST_LIBRARY_PATH "${TEST_LIBRARY_PATH}") - else() - set(TEST_PYTHONPATH "${CMAKE_BINARY_DIR}:${CMAKE_SOURCE_DIR}/tests/util:${CMAKE_BINARY_DIR}/tests/pysidetest:${CMAKE_BINARY_DIR}/../shiboken2/shibokenmodule:$ENV{PYTHONPATH}") - set(TEST_LIBRARY_PATH "${libpyside_BINARY_DIR}:${pysidetest_BINARY_DIR}:$ENV{LD_LIBRARY_PATH}") - set(LIBRARY_PATH_VAR "LD_LIBRARY_PATH") - endif() - + # BUILD_DIR and QT_DIR are used by init_paths.py for setting + # the path to the testbinding module + get_filename_component(BUILD_DIR "${CMAKE_BINARY_DIR}" DIRECTORY) + get_filename_component(BUILD_DIR "${CMAKE_BINARY_DIR}" DIRECTORY) + set(QT_DIR "${_qt5Core_install_prefix}") macro(TEST_QT_MODULE var name) if(NOT DISABLE_${name} AND ${var}) @@ -46,7 +34,7 @@ else() set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${CTEST_TESTING_TIMEOUT} WILL_FAIL ${EXPECT_TO_FAIL} - ENVIRONMENT "PYTHONPATH=${TEST_PYTHONPATH};${LIBRARY_PATH_VAR}=${TEST_LIBRARY_PATH};PYSIDE_DISABLE_INTERNAL_QT_CONF=1;QT_NO_GLIB=1") + ENVIRONMENT "BUILD_DIR=${BUILD_DIR};QT_DIR=${QT_DIR};PYSIDE_DISABLE_INTERNAL_QT_CONF=1;QT_NO_GLIB=1") endmacro() if (NOT DISABLE_QtCore AND NOT DISABLE_QtGui AND NOT DISABLE_QtWidgets) diff --git a/sources/pyside2/tests/Qt3DExtras/qt3dextras_test.py b/sources/pyside2/tests/Qt3DExtras/qt3dextras_test.py index 2f7cc21aa..97ddc8af9 100644 --- a/sources/pyside2/tests/Qt3DExtras/qt3dextras_test.py +++ b/sources/pyside2/tests/Qt3DExtras/qt3dextras_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.usesqguiapplication import UsesQGuiApplication diff --git a/sources/pyside2/tests/QtCharts/qcharts_test.py b/sources/pyside2/tests/QtCharts/qcharts_test.py index 6605c2218..dc10fceb2 100644 --- a/sources/pyside2/tests/QtCharts/qcharts_test.py +++ b/sources/pyside2/tests/QtCharts/qcharts_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.usesqapplication import UsesQApplication from PySide2.QtCore import QRect, QSize, QTimer 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 @@ -26,9 +26,15 @@ ## ############################################################################# +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 ; 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): diff --git a/sources/pyside2/tests/QtDataVisualization/datavisualization_test.py b/sources/pyside2/tests/QtDataVisualization/datavisualization_test.py index 2ff705ee1..af6e5f5d5 100644 --- a/sources/pyside2/tests/QtDataVisualization/datavisualization_test.py +++ b/sources/pyside2/tests/QtDataVisualization/datavisualization_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.usesqguiapplication import UsesQGuiApplication from PySide2.QtCore import QTimer diff --git a/sources/pyside2/tests/QtGui/bug_1091.py b/sources/pyside2/tests/QtGui/bug_1091.py index 28f7d9bea..74c0000ac 100644 --- a/sources/pyside2/tests/QtGui/bug_1091.py +++ b/sources/pyside2/tests/QtGui/bug_1091.py @@ -28,7 +28,14 @@ ''' unit test for BUG #1091 ''' +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 QtGui class QPainterTestCase(unittest.TestCase): diff --git a/sources/pyside2/tests/QtGui/bug_300_test.py b/sources/pyside2/tests/QtGui/bug_300_test.py index c2c1bc9cb..d5da0a418 100644 --- a/sources/pyside2/tests/QtGui/bug_300_test.py +++ b/sources/pyside2/tests/QtGui/bug_300_test.py @@ -26,9 +26,17 @@ ## ############################################################################# -from PySide2.QtCore import QModelIndex, QStringListModel +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 QModelIndex, QStringListModel + + class TestQAbstractItemModelSignals(unittest.TestCase): def sigCallback(self, index, r, c): self._called = True diff --git a/sources/pyside2/tests/QtGui/bug_367.py b/sources/pyside2/tests/QtGui/bug_367.py index 2780df5c9..5080295bf 100644 --- a/sources/pyside2/tests/QtGui/bug_367.py +++ b/sources/pyside2/tests/QtGui/bug_367.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.usesqapplication import UsesQApplication from PySide2 import QtCore,QtGui diff --git a/sources/pyside2/tests/QtGui/bug_480.py b/sources/pyside2/tests/QtGui/bug_480.py index 506dbf53a..41b83e10d 100644 --- a/sources/pyside2/tests/QtGui/bug_480.py +++ b/sources/pyside2/tests/QtGui/bug_480.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 QtWidgets class BuggyWidget(QtWidgets.QWidget): diff --git a/sources/pyside2/tests/QtGui/bug_606.py b/sources/pyside2/tests/QtGui/bug_606.py index 6f01b5797..4f2a4b46e 100644 --- a/sources/pyside2/tests/QtGui/bug_606.py +++ b/sources/pyside2/tests/QtGui/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.QtGui import QVector2D, QVector3D, QVector4D from PySide2.QtGui import QColor diff --git a/sources/pyside2/tests/QtGui/bug_617.py b/sources/pyside2/tests/QtGui/bug_617.py index 370d6469f..32e1fc05e 100644 --- a/sources/pyside2/tests/QtGui/bug_617.py +++ b/sources/pyside2/tests/QtGui/bug_617.py @@ -26,9 +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 from PySide2.QtGui import QColor -import unittest + class MyEvent(QEvent): def __init__(self): diff --git a/sources/pyside2/tests/QtGui/bug_652.py b/sources/pyside2/tests/QtGui/bug_652.py index 92b2d5a82..c80709f98 100644 --- a/sources/pyside2/tests/QtGui/bug_652.py +++ b/sources/pyside2/tests/QtGui/bug_652.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.QtGui import * class MyData(QTextBlockUserData): @@ -55,4 +62,4 @@ class TestBug652(unittest.TestCase): self.assertEqual(blk.userData().getMyNiceData(), heyHo) if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() diff --git a/sources/pyside2/tests/QtGui/bug_660.py b/sources/pyside2/tests/QtGui/bug_660.py index f2a50fd3c..058364d1d 100644 --- a/sources/pyside2/tests/QtGui/bug_660.py +++ b/sources/pyside2/tests/QtGui/bug_660.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.QtGui import QStandardItemModel, QStandardItem diff --git a/sources/pyside2/tests/QtGui/bug_716.py b/sources/pyside2/tests/QtGui/bug_716.py index f29739490..d68b11d0e 100644 --- a/sources/pyside2/tests/QtGui/bug_716.py +++ b/sources/pyside2/tests/QtGui/bug_716.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 Qt, QPersistentModelIndex, QStringListModel if __name__ == '__main__': diff --git a/sources/pyside2/tests/QtGui/bug_740.py b/sources/pyside2/tests/QtGui/bug_740.py index bfd9a03fe..a4db6e5a8 100644 --- a/sources/pyside2/tests/QtGui/bug_740.py +++ b/sources/pyside2/tests/QtGui/bug_740.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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtGui/bug_743.py b/sources/pyside2/tests/QtGui/bug_743.py index 75933ae21..2ad0a0612 100644 --- a/sources/pyside2/tests/QtGui/bug_743.py +++ b/sources/pyside2/tests/QtGui/bug_743.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.QtGui import QMatrix4x4 class TestQMatrix(unittest.TestCase): diff --git a/sources/pyside2/tests/QtGui/bug_991.py b/sources/pyside2/tests/QtGui/bug_991.py index 43af0832a..1af304a27 100644 --- a/sources/pyside2/tests/QtGui/bug_991.py +++ b/sources/pyside2/tests/QtGui/bug_991.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 QObject from PySide2.QtGui import QPen, QBrush diff --git a/sources/pyside2/tests/QtGui/bug_PYSIDE-344.py b/sources/pyside2/tests/QtGui/bug_PYSIDE-344.py index 0946d70ed..f050008a7 100644 --- a/sources/pyside2/tests/QtGui/bug_PYSIDE-344.py +++ b/sources/pyside2/tests/QtGui/bug_PYSIDE-344.py @@ -30,8 +30,14 @@ '''Test cases for PYSIDE-344, imul/idiv are used instead of mul/div, modifying the argument passed in''' +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 * from PySide2.QtGui import * diff --git a/sources/pyside2/tests/QtGui/bug_PYSIDE-41.py b/sources/pyside2/tests/QtGui/bug_PYSIDE-41.py index 128a6574b..15967a512 100644 --- a/sources/pyside2/tests/QtGui/bug_PYSIDE-41.py +++ b/sources/pyside2/tests/QtGui/bug_PYSIDE-41.py @@ -30,8 +30,14 @@ # move this to QtCore -- QStringListModel is part of QtGui and there is no # simple model class appropriate for this test in 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.QtCore import * from PySide2.QtGui import * diff --git a/sources/pyside2/tests/QtGui/deepcopy_test.py b/sources/pyside2/tests/QtGui/deepcopy_test.py index b99912647..d4dcdd64c 100644 --- a/sources/pyside2/tests/QtGui/deepcopy_test.py +++ b/sources/pyside2/tests/QtGui/deepcopy_test.py @@ -26,8 +26,14 @@ ## ############################################################################# -import unittest from copy import deepcopy +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 from PySide2.QtGui import QMatrix diff --git a/sources/pyside2/tests/QtGui/float_to_int_implicit_conversion_test.py b/sources/pyside2/tests/QtGui/float_to_int_implicit_conversion_test.py index 9277fecbb..5e8747a0c 100644 --- a/sources/pyside2/tests/QtGui/float_to_int_implicit_conversion_test.py +++ b/sources/pyside2/tests/QtGui/float_to_int_implicit_conversion_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.QtGui import QImage, qRgb diff --git a/sources/pyside2/tests/QtGui/pyside_reload_test.py b/sources/pyside2/tests/QtGui/pyside_reload_test.py index b4e98c693..f3c7c3e8d 100644 --- a/sources/pyside2/tests/QtGui/pyside_reload_test.py +++ b/sources/pyside2/tests/QtGui/pyside_reload_test.py @@ -31,7 +31,9 @@ import shutil 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/QtGui/qcolor_reduce_test.py b/sources/pyside2/tests/QtGui/qcolor_reduce_test.py index 7f904fd10..adb07fbf1 100644 --- a/sources/pyside2/tests/QtGui/qcolor_reduce_test.py +++ b/sources/pyside2/tests/QtGui/qcolor_reduce_test.py @@ -26,8 +26,15 @@ ## ############################################################################# -import unittest +import os import pickle +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.QtGui import QColor class TestQColor (unittest.TestCase): diff --git a/sources/pyside2/tests/QtGui/qcolor_test.py b/sources/pyside2/tests/QtGui/qcolor_test.py index 021e7c128..55554b6c5 100644 --- a/sources/pyside2/tests/QtGui/qcolor_test.py +++ b/sources/pyside2/tests/QtGui/qcolor_test.py @@ -26,10 +26,16 @@ ## ############################################################################# -import unittest import colorsys -import PySide2 +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 Qt from PySide2.QtGui import QColor diff --git a/sources/pyside2/tests/QtGui/qcursor_test.py b/sources/pyside2/tests/QtGui/qcursor_test.py index 02c0fe514..7adc34788 100644 --- a/sources/pyside2/tests/QtGui/qcursor_test.py +++ b/sources/pyside2/tests/QtGui/qcursor_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.QtGui import QBitmap, QCursor, QPixmap from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtGui/qdatastream_gui_operators_test.py b/sources/pyside2/tests/QtGui/qdatastream_gui_operators_test.py index 9c35cd452..c9b5c16a5 100644 --- a/sources/pyside2/tests/QtGui/qdatastream_gui_operators_test.py +++ b/sources/pyside2/tests/QtGui/qdatastream_gui_operators_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 QDataStream, QByteArray, QIODevice, Qt from PySide2.QtGui import QPixmap, QColor diff --git a/sources/pyside2/tests/QtGui/qdesktopservices_test.py b/sources/pyside2/tests/QtGui/qdesktopservices_test.py index e3c26719c..97bf97de1 100644 --- a/sources/pyside2/tests/QtGui/qdesktopservices_test.py +++ b/sources/pyside2/tests/QtGui/qdesktopservices_test.py @@ -28,8 +28,14 @@ '''Unit tests for QDesktopServices''' +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.QtGui import QDesktopServices from PySide2.QtCore import QUrl diff --git a/sources/pyside2/tests/QtGui/qfontmetrics_test.py b/sources/pyside2/tests/QtGui/qfontmetrics_test.py index 5b5c7d2bf..cbf0b0698 100644 --- a/sources/pyside2/tests/QtGui/qfontmetrics_test.py +++ b/sources/pyside2/tests/QtGui/qfontmetrics_test.py @@ -33,7 +33,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.QtGui import QFont, QFontMetrics, QFontMetricsF from PySide2.QtCore import QRect, QRectF, Qt, QSize, QSizeF diff --git a/sources/pyside2/tests/QtGui/qguiapplication_test.py b/sources/pyside2/tests/QtGui/qguiapplication_test.py index d1a044655..b761cf242 100644 --- a/sources/pyside2/tests/QtGui/qguiapplication_test.py +++ b/sources/pyside2/tests/QtGui/qguiapplication_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.QtGui import QGuiApplication class TestQGuiApplication(unittest.TestCase): diff --git a/sources/pyside2/tests/QtGui/qicon_test.py b/sources/pyside2/tests/QtGui/qicon_test.py index a8763e653..f3ad498e6 100644 --- a/sources/pyside2/tests/QtGui/qicon_test.py +++ b/sources/pyside2/tests/QtGui/qicon_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 helper.timedqapplication import TimedQApplication from PySide2.QtGui import QIcon diff --git a/sources/pyside2/tests/QtGui/qitemselection_test.py b/sources/pyside2/tests/QtGui/qitemselection_test.py index 4bb0375ff..8e9639a31 100644 --- a/sources/pyside2/tests/QtGui/qitemselection_test.py +++ b/sources/pyside2/tests/QtGui/qitemselection_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 helper.usesqapplication import UsesQApplication from PySide2.QtCore import QItemSelection diff --git a/sources/pyside2/tests/QtGui/qkeysequence_test.py b/sources/pyside2/tests/QtGui/qkeysequence_test.py index be28e5dec..226793400 100644 --- a/sources/pyside2/tests/QtGui/qkeysequence_test.py +++ b/sources/pyside2/tests/QtGui/qkeysequence_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 Qt from PySide2.QtGui import QKeySequence diff --git a/sources/pyside2/tests/QtGui/qmatrix_test.py b/sources/pyside2/tests/QtGui/qmatrix_test.py index bc6a2b8ae..48380faf6 100644 --- a/sources/pyside2/tests/QtGui/qmatrix_test.py +++ b/sources/pyside2/tests/QtGui/qmatrix_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 QPoint from PySide2.QtGui import QMatrix, QMatrix2x2, QMatrix4x4 diff --git a/sources/pyside2/tests/QtGui/qopenglbuffer_test.py b/sources/pyside2/tests/QtGui/qopenglbuffer_test.py index c80bd41b2..a5d8385c9 100644 --- a/sources/pyside2/tests/QtGui/qopenglbuffer_test.py +++ b/sources/pyside2/tests/QtGui/qopenglbuffer_test.py @@ -33,7 +33,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.usesqapplication import UsesQApplication from PySide2.QtGui import QOpenGLBuffer diff --git a/sources/pyside2/tests/QtGui/qopenglwindow_test.py b/sources/pyside2/tests/QtGui/qopenglwindow_test.py index 316b39203..e39cfb19c 100644 --- a/sources/pyside2/tests/QtGui/qopenglwindow_test.py +++ b/sources/pyside2/tests/QtGui/qopenglwindow_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.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtGui/qpainter_test.py b/sources/pyside2/tests/QtGui/qpainter_test.py index 77cea835f..d86e69b64 100644 --- a/sources/pyside2/tests/QtGui/qpainter_test.py +++ b/sources/pyside2/tests/QtGui/qpainter_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.QtGui import QPainter, QLinearGradient from PySide2.QtCore import QLine, QLineF, QPoint, QPointF, QRect, QRectF, Qt diff --git a/sources/pyside2/tests/QtGui/qpdfwriter_test.py b/sources/pyside2/tests/QtGui/qpdfwriter_test.py index dbda66133..aae636d31 100644 --- a/sources/pyside2/tests/QtGui/qpdfwriter_test.py +++ b/sources/pyside2/tests/QtGui/qpdfwriter_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 helper.usesqapplication import UsesQApplication from PySide2.QtGui import QPageLayout, QPageSize, QPdfWriter, QTextDocument diff --git a/sources/pyside2/tests/QtGui/qpixelformat_test.py b/sources/pyside2/tests/QtGui/qpixelformat_test.py index fb0c10611..30ea213d6 100644 --- a/sources/pyside2/tests/QtGui/qpixelformat_test.py +++ b/sources/pyside2/tests/QtGui/qpixelformat_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.usesqapplication import UsesQApplication from PySide2.QtCore import QSize, Qt diff --git a/sources/pyside2/tests/QtGui/qpixmap_test.py b/sources/pyside2/tests/QtGui/qpixmap_test.py index d59fa0281..7d2d75bc3 100644 --- a/sources/pyside2/tests/QtGui/qpixmap_test.py +++ b/sources/pyside2/tests/QtGui/qpixmap_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 helper.usesqapplication import UsesQApplication from PySide2.QtGui import * diff --git a/sources/pyside2/tests/QtGui/qpixmapcache_test.py b/sources/pyside2/tests/QtGui/qpixmapcache_test.py index a0e8dc03c..672ea79d5 100644 --- a/sources/pyside2/tests/QtGui/qpixmapcache_test.py +++ b/sources/pyside2/tests/QtGui/qpixmapcache_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 helper.usesqapplication import UsesQApplication from PySide2.QtGui import QPixmapCache, QPixmap diff --git a/sources/pyside2/tests/QtGui/qpolygonf_test.py b/sources/pyside2/tests/QtGui/qpolygonf_test.py index 023af533d..a21518a7e 100644 --- a/sources/pyside2/tests/QtGui/qpolygonf_test.py +++ b/sources/pyside2/tests/QtGui/qpolygonf_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 * from PySide2.QtGui import * diff --git a/sources/pyside2/tests/QtGui/qradialgradient_test.py b/sources/pyside2/tests/QtGui/qradialgradient_test.py index c9f5bd8b0..728a721f9 100644 --- a/sources/pyside2/tests/QtGui/qradialgradient_test.py +++ b/sources/pyside2/tests/QtGui/qradialgradient_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.QtGui import QRadialGradient from PySide2.QtCore import QPointF diff --git a/sources/pyside2/tests/QtGui/qrasterwindow_test.py b/sources/pyside2/tests/QtGui/qrasterwindow_test.py index 5bb13600b..f18ceaaf4 100644 --- a/sources/pyside2/tests/QtGui/qrasterwindow_test.py +++ b/sources/pyside2/tests/QtGui/qrasterwindow_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.usesqapplication import UsesQApplication from PySide2.QtCore import QEvent, QPoint, QRect, QSize, QTimer, Qt diff --git a/sources/pyside2/tests/QtGui/qregion_test.py b/sources/pyside2/tests/QtGui/qregion_test.py index 085fcec3a..3e05617ef 100644 --- a/sources/pyside2/tests/QtGui/qregion_test.py +++ b/sources/pyside2/tests/QtGui/qregion_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.QtGui import QRegion from PySide2.QtCore import QPoint diff --git a/sources/pyside2/tests/QtGui/qstylehints_test.py b/sources/pyside2/tests/QtGui/qstylehints_test.py index a771d38f2..3cecfa60b 100644 --- a/sources/pyside2/tests/QtGui/qstylehints_test.py +++ b/sources/pyside2/tests/QtGui/qstylehints_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.usesqapplication import UsesQApplication from PySide2.QtGui import QStyleHints diff --git a/sources/pyside2/tests/QtGui/qtextdocument_functions.py b/sources/pyside2/tests/QtGui/qtextdocument_functions.py index f1376aa5b..765a6b5b7 100644 --- a/sources/pyside2/tests/QtGui/qtextdocument_functions.py +++ b/sources/pyside2/tests/QtGui/qtextdocument_functions.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.QtGui import Qt from PySide2.QtCore import QTextCodec diff --git a/sources/pyside2/tests/QtGui/qtextdocument_undoredo_test.py b/sources/pyside2/tests/QtGui/qtextdocument_undoredo_test.py index ce5474b42..1cbb8ff29 100644 --- a/sources/pyside2/tests/QtGui/qtextdocument_undoredo_test.py +++ b/sources/pyside2/tests/QtGui/qtextdocument_undoredo_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.QtGui import QTextDocument, QTextCursor class QTextDocumentTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtGui/qtextdocumentwriter_test.py b/sources/pyside2/tests/QtGui/qtextdocumentwriter_test.py index f13ba884e..d9d96dd34 100644 --- a/sources/pyside2/tests/QtGui/qtextdocumentwriter_test.py +++ b/sources/pyside2/tests/QtGui/qtextdocumentwriter_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.QtGui import QTextDocumentWriter, QTextDocument from PySide2.QtCore import QBuffer diff --git a/sources/pyside2/tests/QtGui/qtextline_test.py b/sources/pyside2/tests/QtGui/qtextline_test.py index 5abdc076b..92af7b823 100644 --- a/sources/pyside2/tests/QtGui/qtextline_test.py +++ b/sources/pyside2/tests/QtGui/qtextline_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.QtGui import QTextLayout from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtGui/qtransform_test.py b/sources/pyside2/tests/QtGui/qtransform_test.py index f121868b0..29f9b86bb 100644 --- a/sources/pyside2/tests/QtGui/qtransform_test.py +++ b/sources/pyside2/tests/QtGui/qtransform_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 QPointF from PySide2.QtGui import QTransform, QPolygonF, QPolygonF diff --git a/sources/pyside2/tests/QtGui/repr_test.py b/sources/pyside2/tests/QtGui/repr_test.py index bcf276319..e06f4d487 100644 --- a/sources/pyside2/tests/QtGui/repr_test.py +++ b/sources/pyside2/tests/QtGui/repr_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) + import PySide2 from PySide2.QtCore import QPoint from PySide2.QtGui import QMatrix diff --git a/sources/pyside2/tests/QtGui/timed_app_and_patching_test.py b/sources/pyside2/tests/QtGui/timed_app_and_patching_test.py index 897310057..1f873fa02 100644 --- a/sources/pyside2/tests/QtGui/timed_app_and_patching_test.py +++ b/sources/pyside2/tests/QtGui/timed_app_and_patching_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 helper.timedqapplication import TimedQApplication from PySide2.support import deprecated diff --git a/sources/pyside2/tests/QtHelp/help_test.py b/sources/pyside2/tests/QtHelp/help_test.py index e99214d4b..42814a30f 100644 --- a/sources/pyside2/tests/QtHelp/help_test.py +++ b/sources/pyside2/tests/QtHelp/help_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.QtHelp import QHelpEngine diff --git a/sources/pyside2/tests/QtHelp/helpsearchengine_test.py b/sources/pyside2/tests/QtHelp/helpsearchengine_test.py index b81078b29..54f74b8fc 100644 --- a/sources/pyside2/tests/QtHelp/helpsearchengine_test.py +++ b/sources/pyside2/tests/QtHelp/helpsearchengine_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.QtHelp import QHelpEngineCore, QHelpSearchEngine, QHelpSearchResult diff --git a/sources/pyside2/tests/QtLocation/location.py b/sources/pyside2/tests/QtLocation/location.py index e3c2f546e..151470a22 100644 --- a/sources/pyside2/tests/QtLocation/location.py +++ b/sources/pyside2/tests/QtLocation/location.py @@ -28,9 +28,17 @@ '''Unit test for Location''' -from PySide2.QtLocation import QGeoServiceProvider +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.QtLocation import QGeoServiceProvider + + class QLocationTestCase(unittest.TestCase): def test(self): geoServiceProvider = QGeoServiceProvider("none") diff --git a/sources/pyside2/tests/QtMultimedia/audio_test.py b/sources/pyside2/tests/QtMultimedia/audio_test.py index 97352988d..f242865f1 100644 --- a/sources/pyside2/tests/QtMultimedia/audio_test.py +++ b/sources/pyside2/tests/QtMultimedia/audio_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.usesqguiapplication import UsesQGuiApplication from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtMultimediaWidgets/qmultimediawidgets.py b/sources/pyside2/tests/QtMultimediaWidgets/qmultimediawidgets.py index 99d4bba83..f7ad812eb 100644 --- a/sources/pyside2/tests/QtMultimediaWidgets/qmultimediawidgets.py +++ b/sources/pyside2/tests/QtMultimediaWidgets/qmultimediawidgets.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.usesqapplication import UsesQApplication from PySide2.QtMultimediaWidgets import QGraphicsVideoItem, QVideoWidget diff --git a/sources/pyside2/tests/QtNetwork/accessManager_test.py b/sources/pyside2/tests/QtNetwork/accessManager_test.py index 95c882d26..12ed25317 100644 --- a/sources/pyside2/tests/QtNetwork/accessManager_test.py +++ b/sources/pyside2/tests/QtNetwork/accessManager_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 * from PySide2.QtNetwork import * diff --git a/sources/pyside2/tests/QtNetwork/bug_1084.py b/sources/pyside2/tests/QtNetwork/bug_1084.py index 947ba1466..d2c273fca 100644 --- a/sources/pyside2/tests/QtNetwork/bug_1084.py +++ b/sources/pyside2/tests/QtNetwork/bug_1084.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 import QtNetwork import py3kcompat as py3k diff --git a/sources/pyside2/tests/QtNetwork/bug_446.py b/sources/pyside2/tests/QtNetwork/bug_446.py index 91333ef7a..f15ff01f9 100644 --- a/sources/pyside2/tests/QtNetwork/bug_446.py +++ b/sources/pyside2/tests/QtNetwork/bug_446.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 * from PySide2.QtNetwork import * diff --git a/sources/pyside2/tests/QtNetwork/dnslookup_test.py b/sources/pyside2/tests/QtNetwork/dnslookup_test.py index b0375b0f5..3a8b7a2d7 100644 --- a/sources/pyside2/tests/QtNetwork/dnslookup_test.py +++ b/sources/pyside2/tests/QtNetwork/dnslookup_test.py @@ -28,8 +28,14 @@ '''Test cases for QDnsLookup''' +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 from PySide2.QtNetwork import QDnsLookup diff --git a/sources/pyside2/tests/QtNetwork/qipv6address_test.py b/sources/pyside2/tests/QtNetwork/qipv6address_test.py index 04e6c3fc4..046d4d850 100644 --- a/sources/pyside2/tests/QtNetwork/qipv6address_test.py +++ b/sources/pyside2/tests/QtNetwork/qipv6address_test.py @@ -28,8 +28,14 @@ '''Test cases for QIPv6Address''' +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.QtNetwork import * class QIPv6AddressGetItemTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtNetwork/qpassworddigestor_test.py b/sources/pyside2/tests/QtNetwork/qpassworddigestor_test.py index 503ffecdc..13da3e733 100644 --- a/sources/pyside2/tests/QtNetwork/qpassworddigestor_test.py +++ b/sources/pyside2/tests/QtNetwork/qpassworddigestor_test.py @@ -30,8 +30,14 @@ '''Test cases for QPasswordDigestor''' +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, QCryptographicHash from PySide2.QtNetwork import QPasswordDigestor diff --git a/sources/pyside2/tests/QtNetwork/tcpserver_test.py b/sources/pyside2/tests/QtNetwork/tcpserver_test.py index afa332898..9a047e5c6 100644 --- a/sources/pyside2/tests/QtNetwork/tcpserver_test.py +++ b/sources/pyside2/tests/QtNetwork/tcpserver_test.py @@ -28,8 +28,14 @@ '''Test cases for QTCPServer''' +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.QtNetwork import QTcpServer class ListenDefaultArgsCase(unittest.TestCase): diff --git a/sources/pyside2/tests/QtNetwork/udpsocket_test.py b/sources/pyside2/tests/QtNetwork/udpsocket_test.py index fc7f7b0d2..da5a21c29 100644 --- a/sources/pyside2/tests/QtNetwork/udpsocket_test.py +++ b/sources/pyside2/tests/QtNetwork/udpsocket_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 QUrl, QObject, SIGNAL, QCoreApplication, QTimer from PySide2.QtNetwork import QUdpSocket, QHostAddress diff --git a/sources/pyside2/tests/QtOpenGL/qglbuffer_test.py b/sources/pyside2/tests/QtOpenGL/qglbuffer_test.py index 56812e0fa..e633d6ee2 100644 --- a/sources/pyside2/tests/QtOpenGL/qglbuffer_test.py +++ b/sources/pyside2/tests/QtOpenGL/qglbuffer_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 QByteArray from PySide2.QtOpenGL import QGLBuffer, QGLWidget diff --git a/sources/pyside2/tests/QtOpenGL/qglwidget_test.py b/sources/pyside2/tests/QtOpenGL/qglwidget_test.py index 8779578bf..c3bb7e27d 100644 --- a/sources/pyside2/tests/QtOpenGL/qglwidget_test.py +++ b/sources/pyside2/tests/QtOpenGL/qglwidget_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.QtGui import * from PySide2.QtWidgets import * from PySide2.QtOpenGL import * diff --git a/sources/pyside2/tests/QtPositioning/positioning.py b/sources/pyside2/tests/QtPositioning/positioning.py index 1b3e263ec..8b9b715c1 100644 --- a/sources/pyside2/tests/QtPositioning/positioning.py +++ b/sources/pyside2/tests/QtPositioning/positioning.py @@ -28,9 +28,17 @@ '''Unit test for Positioning''' -from PySide2.QtPositioning import QGeoPositionInfoSource +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.QtPositioning import QGeoPositionInfoSource + + class QPositioningTestCase(unittest.TestCase): def test(self): source = QGeoPositionInfoSource.createDefaultSource(None) diff --git a/sources/pyside2/tests/QtPrintSupport/bug_500.py b/sources/pyside2/tests/QtPrintSupport/bug_500.py index 0a13da7d1..43146d021 100644 --- a/sources/pyside2/tests/QtPrintSupport/bug_500.py +++ b/sources/pyside2/tests/QtPrintSupport/bug_500.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 * from PySide2.QtPrintSupport import * diff --git a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py index 1ca9431c8..573ca9940 100644 --- a/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py +++ b/sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_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.QtGui import QTextCursor from PySide2.QtPrintSupport import QPrinter, QPrinterInfo diff --git a/sources/pyside2/tests/QtQml/bug_1029.py b/sources/pyside2/tests/QtQml/bug_1029.py index 92734cb3b..36306e4a2 100644 --- a/sources/pyside2/tests/QtQml/bug_1029.py +++ b/sources/pyside2/tests/QtQml/bug_1029.py @@ -26,8 +26,14 @@ ## ############################################################################# -import sys 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 QUrl from PySide2.QtGui import QGuiApplication diff --git a/sources/pyside2/tests/QtQml/bug_451.py b/sources/pyside2/tests/QtQml/bug_451.py index f6405ffc8..f87680638 100644 --- a/sources/pyside2/tests/QtQml/bug_451.py +++ b/sources/pyside2/tests/QtQml/bug_451.py @@ -37,7 +37,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 diff --git a/sources/pyside2/tests/QtQml/bug_456.py b/sources/pyside2/tests/QtQml/bug_456.py index 0ecc012f8..a99ce2b80 100644 --- a/sources/pyside2/tests/QtQml/bug_456.py +++ b/sources/pyside2/tests/QtQml/bug_456.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 helper.helper import adjust_filename from helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtQml/bug_557.py b/sources/pyside2/tests/QtQml/bug_557.py index a8b330865..20892475f 100644 --- a/sources/pyside2/tests/QtQml/bug_557.py +++ b/sources/pyside2/tests/QtQml/bug_557.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 helper.helper import adjust_filename diff --git a/sources/pyside2/tests/QtQml/bug_726.py b/sources/pyside2/tests/QtQml/bug_726.py index 4594a43b6..795d8a13f 100644 --- a/sources/pyside2/tests/QtQml/bug_726.py +++ b/sources/pyside2/tests/QtQml/bug_726.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 helper.helper import adjust_filename from helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtQml/bug_814.py b/sources/pyside2/tests/QtQml/bug_814.py index 5b38f134d..c6f0b8441 100644 --- a/sources/pyside2/tests/QtQml/bug_814.py +++ b/sources/pyside2/tests/QtQml/bug_814.py @@ -41,7 +41,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 helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtQml/bug_825.py b/sources/pyside2/tests/QtQml/bug_825.py index fcf0fac28..019653e93 100644 --- a/sources/pyside2/tests/QtQml/bug_825.py +++ b/sources/pyside2/tests/QtQml/bug_825.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 helper.helper import adjust_filename diff --git a/sources/pyside2/tests/QtQml/bug_847.py b/sources/pyside2/tests/QtQml/bug_847.py index 7347e1649..ac5836459 100644 --- a/sources/pyside2/tests/QtQml/bug_847.py +++ b/sources/pyside2/tests/QtQml/bug_847.py @@ -40,7 +40,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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtQml/bug_915.py b/sources/pyside2/tests/QtQml/bug_915.py index 74cc30d4c..9c888b4ae 100644 --- a/sources/pyside2/tests/QtQml/bug_915.py +++ b/sources/pyside2/tests/QtQml/bug_915.py @@ -33,7 +33,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.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtQml/bug_926.py b/sources/pyside2/tests/QtQml/bug_926.py index 2eb958d89..0764b8e97 100644 --- a/sources/pyside2/tests/QtQml/bug_926.py +++ b/sources/pyside2/tests/QtQml/bug_926.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 helper.helper import adjust_filename diff --git a/sources/pyside2/tests/QtQml/bug_951.py b/sources/pyside2/tests/QtQml/bug_951.py index 2223b2a50..8919f5880 100644 --- a/sources/pyside2/tests/QtQml/bug_951.py +++ b/sources/pyside2/tests/QtQml/bug_951.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 helper.helper import adjust_filename from helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtQml/bug_995.py b/sources/pyside2/tests/QtQml/bug_995.py index 9a83a8110..945cd5bcc 100644 --- a/sources/pyside2/tests/QtQml/bug_995.py +++ b/sources/pyside2/tests/QtQml/bug_995.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 helper.helper import adjust_filename from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtQml/bug_997.py b/sources/pyside2/tests/QtQml/bug_997.py index 9d4efff71..597e253e5 100644 --- a/sources/pyside2/tests/QtQml/bug_997.py +++ b/sources/pyside2/tests/QtQml/bug_997.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 helper.helper import adjust_filename from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtQml/connect_python_qml.py b/sources/pyside2/tests/QtQml/connect_python_qml.py index 31569b7aa..22134efe7 100644 --- a/sources/pyside2/tests/QtQml/connect_python_qml.py +++ b/sources/pyside2/tests/QtQml/connect_python_qml.py @@ -37,7 +37,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 helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtQml/javascript_exceptions.py b/sources/pyside2/tests/QtQml/javascript_exceptions.py index 2cf81fc80..a5e6a4b43 100644 --- a/sources/pyside2/tests/QtQml/javascript_exceptions.py +++ b/sources/pyside2/tests/QtQml/javascript_exceptions.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 helper.helper import adjust_filename from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.py b/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.py index 281646545..f33d852a7 100644 --- a/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.py +++ b/sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.py @@ -33,7 +33,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 diff --git a/sources/pyside2/tests/QtQml/qqmlnetwork_test.py b/sources/pyside2/tests/QtQml/qqmlnetwork_test.py index 4ea5f8d19..2cc273431 100644 --- a/sources/pyside2/tests/QtQml/qqmlnetwork_test.py +++ b/sources/pyside2/tests/QtQml/qqmlnetwork_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 QUrl from PySide2.QtQuick import QQuickView diff --git a/sources/pyside2/tests/QtQml/qquickitem_grabToImage.py b/sources/pyside2/tests/QtQml/qquickitem_grabToImage.py index a9618a92a..6735d5230 100644 --- a/sources/pyside2/tests/QtQml/qquickitem_grabToImage.py +++ b/sources/pyside2/tests/QtQml/qquickitem_grabToImage.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 helper.helper import adjust_filename from helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtQml/qquickview_test.py b/sources/pyside2/tests/QtQml/qquickview_test.py index e0b35dc59..0b723612e 100644 --- a/sources/pyside2/tests/QtQml/qquickview_test.py +++ b/sources/pyside2/tests/QtQml/qquickview_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 from helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtQml/registertype.py b/sources/pyside2/tests/QtQml/registertype.py index be15b87e8..7e6fe8d29 100644 --- a/sources/pyside2/tests/QtQml/registertype.py +++ b/sources/pyside2/tests/QtQml/registertype.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 helper.helper import adjust_filename diff --git a/sources/pyside2/tests/QtQml/signal_arguments.py b/sources/pyside2/tests/QtQml/signal_arguments.py index d46a34fcb..98b52c05c 100644 --- a/sources/pyside2/tests/QtQml/signal_arguments.py +++ b/sources/pyside2/tests/QtQml/signal_arguments.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 helper.helper import adjust_filename from helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtScript/base_test.py b/sources/pyside2/tests/QtScript/base_test.py index 4343a6d77..3cde8ad83 100644 --- a/sources/pyside2/tests/QtScript/base_test.py +++ b/sources/pyside2/tests/QtScript/base_test.py @@ -26,6 +26,13 @@ ## ############################################################################# +import os +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 import QtScript diff --git a/sources/pyside2/tests/QtScript/bug_1022.py b/sources/pyside2/tests/QtScript/bug_1022.py index 63866ec3c..2c2699de6 100644 --- a/sources/pyside2/tests/QtScript/bug_1022.py +++ b/sources/pyside2/tests/QtScript/bug_1022.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 * from PySide2.QtScript import * diff --git a/sources/pyside2/tests/QtScript/engine_test.py b/sources/pyside2/tests/QtScript/engine_test.py index 2b228281c..f88b98d69 100644 --- a/sources/pyside2/tests/QtScript/engine_test.py +++ b/sources/pyside2/tests/QtScript/engine_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 from PySide2.QtScript import QScriptEngine diff --git a/sources/pyside2/tests/QtScript/property_test.py b/sources/pyside2/tests/QtScript/property_test.py index a5c9f059b..372bba2ba 100644 --- a/sources/pyside2/tests/QtScript/property_test.py +++ b/sources/pyside2/tests/QtScript/property_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, Property, QCoreApplication from PySide2.QtScript import QScriptEngine diff --git a/sources/pyside2/tests/QtScript/qscriptvalue_test.py b/sources/pyside2/tests/QtScript/qscriptvalue_test.py index e5f2a0734..06a029232 100644 --- a/sources/pyside2/tests/QtScript/qscriptvalue_test.py +++ b/sources/pyside2/tests/QtScript/qscriptvalue_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.QtScript import * diff --git a/sources/pyside2/tests/QtScriptTools/debugger_test.py b/sources/pyside2/tests/QtScriptTools/debugger_test.py index a5ec8867a..cefe48f5b 100644 --- a/sources/pyside2/tests/QtScriptTools/debugger_test.py +++ b/sources/pyside2/tests/QtScriptTools/debugger_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 SIGNAL, QTimer from PySide2.QtScript import QScriptEngine diff --git a/sources/pyside2/tests/QtScxml/test_dynamic.py b/sources/pyside2/tests/QtScxml/test_dynamic.py index 2a9ad97df..51672a9bb 100644 --- a/sources/pyside2/tests/QtScxml/test_dynamic.py +++ b/sources/pyside2/tests/QtScxml/test_dynamic.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 helper.timedqapplication import TimedQApplication from PySide2.QtCore import QObject, SIGNAL diff --git a/sources/pyside2/tests/QtSensors/sensors.py b/sources/pyside2/tests/QtSensors/sensors.py index 2f25adebb..360d68999 100644 --- a/sources/pyside2/tests/QtSensors/sensors.py +++ b/sources/pyside2/tests/QtSensors/sensors.py @@ -30,9 +30,17 @@ '''Test cases for QSensor''' -from PySide2.QtSensors import QSensor, QSensorReading +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.QtSensors import QSensor, QSensorReading + + class QSensorTest(unittest.TestCase): def test(self): for sensorType in QSensor.sensorTypes(): diff --git a/sources/pyside2/tests/QtSql/bug_1013.py b/sources/pyside2/tests/QtSql/bug_1013.py index 3b8fb5d09..3cade31f4 100644 --- a/sources/pyside2/tests/QtSql/bug_1013.py +++ b/sources/pyside2/tests/QtSql/bug_1013.py @@ -26,9 +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 * from PySide2.QtSql import * -import unittest + class TestBug1013 (unittest.TestCase): diff --git a/sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py b/sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py index 5bb034aa0..7db28b992 100644 --- a/sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py +++ b/sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py @@ -30,9 +30,15 @@ '''Test cases for QtSql database creation, destruction and queries''' +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 import QtSql from PySide2.QtCore import * from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/QtSql/qvarianttype_test.py b/sources/pyside2/tests/QtSql/qvarianttype_test.py index 266cafa22..3175a178f 100644 --- a/sources/pyside2/tests/QtSql/qvarianttype_test.py +++ b/sources/pyside2/tests/QtSql/qvarianttype_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) import py3kcompat as py3k from PySide2.QtSql import QSqlField diff --git a/sources/pyside2/tests/QtSvg/qsvggenerator_test.py b/sources/pyside2/tests/QtSvg/qsvggenerator_test.py index 2b3bed756..e4680f6ca 100644 --- a/sources/pyside2/tests/QtSvg/qsvggenerator_test.py +++ b/sources/pyside2/tests/QtSvg/qsvggenerator_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 QBuffer from PySide2.QtSvg import QSvgGenerator diff --git a/sources/pyside2/tests/QtSvg/qsvgrenderer_test.py b/sources/pyside2/tests/QtSvg/qsvgrenderer_test.py index ee276ae93..88537edfe 100644 --- a/sources/pyside2/tests/QtSvg/qsvgrenderer_test.py +++ b/sources/pyside2/tests/QtSvg/qsvgrenderer_test.py @@ -28,7 +28,14 @@ ## ############################################################################# -import unittest, os +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 * from PySide2.QtWidgets import * from PySide2.QtSvg import * diff --git a/sources/pyside2/tests/QtSvg/qsvgwidget_test.py b/sources/pyside2/tests/QtSvg/qsvgwidget_test.py index 59cf35d63..17bf6527b 100644 --- a/sources/pyside2/tests/QtSvg/qsvgwidget_test.py +++ b/sources/pyside2/tests/QtSvg/qsvgwidget_test.py @@ -28,7 +28,14 @@ ## ############################################################################# -import unittest, os +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 * from PySide2.QtWidgets import * from PySide2.QtSvg import * diff --git a/sources/pyside2/tests/QtTest/click_test.py b/sources/pyside2/tests/QtTest/click_test.py index 48b01e30c..8b3be38ea 100644 --- a/sources/pyside2/tests/QtTest/click_test.py +++ b/sources/pyside2/tests/QtTest/click_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 Qt, QObject from PySide2.QtWidgets import QPushButton, QLineEdit diff --git a/sources/pyside2/tests/QtTest/eventfilter_test.py b/sources/pyside2/tests/QtTest/eventfilter_test.py index c087e2550..6ca61c36b 100644 --- a/sources/pyside2/tests/QtTest/eventfilter_test.py +++ b/sources/pyside2/tests/QtTest/eventfilter_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 Qt, QObject, QEvent from PySide2.QtGui import QKeyEvent diff --git a/sources/pyside2/tests/QtTest/qvalidator_test.py b/sources/pyside2/tests/QtTest/qvalidator_test.py index d3ac5571f..021e455f2 100644 --- a/sources/pyside2/tests/QtTest/qvalidator_test.py +++ b/sources/pyside2/tests/QtTest/qvalidator_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 * from PySide2.QtGui import * diff --git a/sources/pyside2/tests/QtTest/touchevent_test.py b/sources/pyside2/tests/QtTest/touchevent_test.py index 0105ac684..8f9b88461 100644 --- a/sources/pyside2/tests/QtTest/touchevent_test.py +++ b/sources/pyside2/tests/QtTest/touchevent_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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py b/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py index 6bf8f85b1..4881bd25a 100644 --- a/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py +++ b/sources/pyside2/tests/QtTextToSpeech/qtexttospeech_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.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtUiTools/bug_1060.py b/sources/pyside2/tests/QtUiTools/bug_1060.py index 22da11a82..f60912780 100644 --- a/sources/pyside2/tests/QtUiTools/bug_1060.py +++ b/sources/pyside2/tests/QtUiTools/bug_1060.py @@ -31,7 +31,9 @@ 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(False) from helper.helper import adjust_filename from PySide2.QtWidgets import QApplication diff --git a/sources/pyside2/tests/QtUiTools/bug_360.py b/sources/pyside2/tests/QtUiTools/bug_360.py index 6af5ff49d..8d15f2730 100644 --- a/sources/pyside2/tests/QtUiTools/bug_360.py +++ b/sources/pyside2/tests/QtUiTools/bug_360.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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtUiTools/bug_376.py b/sources/pyside2/tests/QtUiTools/bug_376.py index 1da380fd3..264faad7f 100644 --- a/sources/pyside2/tests/QtUiTools/bug_376.py +++ b/sources/pyside2/tests/QtUiTools/bug_376.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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtUiTools/bug_392.py b/sources/pyside2/tests/QtUiTools/bug_392.py index 9b5782f2b..2439e7203 100644 --- a/sources/pyside2/tests/QtUiTools/bug_392.py +++ b/sources/pyside2/tests/QtUiTools/bug_392.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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtUiTools/bug_426.py b/sources/pyside2/tests/QtUiTools/bug_426.py index 5b055a45f..e84da0382 100644 --- a/sources/pyside2/tests/QtUiTools/bug_426.py +++ b/sources/pyside2/tests/QtUiTools/bug_426.py @@ -26,8 +26,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 import QtCore, QtWidgets from PySide2.QtUiTools import QUiLoader diff --git a/sources/pyside2/tests/QtUiTools/bug_552.py b/sources/pyside2/tests/QtUiTools/bug_552.py index 7a0530897..be42789cf 100644 --- a/sources/pyside2/tests/QtUiTools/bug_552.py +++ b/sources/pyside2/tests/QtUiTools/bug_552.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 helper.helper import adjust_filename from PySide2 import QtWidgets, QtCore diff --git a/sources/pyside2/tests/QtUiTools/bug_797.py b/sources/pyside2/tests/QtUiTools/bug_797.py index 0fb7ed435..454699196 100644 --- a/sources/pyside2/tests/QtUiTools/bug_797.py +++ b/sources/pyside2/tests/QtUiTools/bug_797.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 helper.helper import adjust_filename diff --git a/sources/pyside2/tests/QtUiTools/bug_909.py b/sources/pyside2/tests/QtUiTools/bug_909.py index 5c9c12521..9831b6b0e 100644 --- a/sources/pyside2/tests/QtUiTools/bug_909.py +++ b/sources/pyside2/tests/QtUiTools/bug_909.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 QFile from PySide2.QtWidgets import QTabWidget diff --git a/sources/pyside2/tests/QtUiTools/bug_913.py b/sources/pyside2/tests/QtUiTools/bug_913.py index b0a871b8b..3e2ca818b 100644 --- a/sources/pyside2/tests/QtUiTools/bug_913.py +++ b/sources/pyside2/tests/QtUiTools/bug_913.py @@ -33,7 +33,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 diff --git a/sources/pyside2/tests/QtUiTools/bug_958.py b/sources/pyside2/tests/QtUiTools/bug_958.py index f631d36e3..98ac16189 100644 --- a/sources/pyside2/tests/QtUiTools/bug_958.py +++ b/sources/pyside2/tests/QtUiTools/bug_958.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 import QtWidgets, QtUiTools from helper.helper import adjust_filename diff --git a/sources/pyside2/tests/QtUiTools/bug_965.py b/sources/pyside2/tests/QtUiTools/bug_965.py index a8fabe727..217f948af 100644 --- a/sources/pyside2/tests/QtUiTools/bug_965.py +++ b/sources/pyside2/tests/QtUiTools/bug_965.py @@ -26,12 +26,15 @@ ## ############################################################################# -from PySide2.QtUiTools import QUiLoader 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.QtUiTools import QUiLoader from helper.usesqapplication import UsesQApplication from helper.helper import adjust_filename diff --git a/sources/pyside2/tests/QtUiTools/ui_test.py b/sources/pyside2/tests/QtUiTools/ui_test.py index 2fe78fba4..6705bb0be 100644 --- a/sources/pyside2/tests/QtUiTools/ui_test.py +++ b/sources/pyside2/tests/QtUiTools/ui_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.QtUiTools import QUiLoader diff --git a/sources/pyside2/tests/QtUiTools/uiloader_test.py b/sources/pyside2/tests/QtUiTools/uiloader_test.py index 4f5881719..48b401426 100644 --- a/sources/pyside2/tests/QtUiTools/uiloader_test.py +++ b/sources/pyside2/tests/QtUiTools/uiloader_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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWebEngine/web_engine_initialize.py b/sources/pyside2/tests/QtWebEngine/web_engine_initialize.py index f6abeb9cd..1f0482f96 100644 --- a/sources/pyside2/tests/QtWebEngine/web_engine_initialize.py +++ b/sources/pyside2/tests/QtWebEngine/web_engine_initialize.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 QTimer from PySide2.QtWebEngine import QtWebEngine from PySide2.QtWidgets import QApplication diff --git a/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py b/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py index 7fc879fa9..190810edb 100644 --- a/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py +++ b/sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.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 QBuffer, Qt, QTimer from PySide2.QtWidgets import QApplication, QWidget, QVBoxLayout diff --git a/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py b/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py index a56d6d0f5..a40e29887 100644 --- a/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py +++ b/sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.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 import QtWidgets from PySide2 import QtWebEngineWidgets diff --git a/sources/pyside2/tests/QtWebKit/bug_448.py b/sources/pyside2/tests/QtWebKit/bug_448.py index c8341840a..98ebb1958 100644 --- a/sources/pyside2/tests/QtWebKit/bug_448.py +++ b/sources/pyside2/tests/QtWebKit/bug_448.py @@ -28,8 +28,13 @@ '''Test cases for bug: http://bugs.openbossa.org/show_bug.cgi?id=448''' -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.QtWidgets import QApplication from PySide2.QtWebKit import QWebView diff --git a/sources/pyside2/tests/QtWebKit/bug_694.py b/sources/pyside2/tests/QtWebKit/bug_694.py index 60fb37f84..b18d658f6 100644 --- a/sources/pyside2/tests/QtWebKit/bug_694.py +++ b/sources/pyside2/tests/QtWebKit/bug_694.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 * from PySide2.QtWidgets import * from PySide2.QtWebKit import * diff --git a/sources/pyside2/tests/QtWebKit/bug_803.py b/sources/pyside2/tests/QtWebKit/bug_803.py index ea2b34ce2..ec6f93c33 100644 --- a/sources/pyside2/tests/QtWebKit/bug_803.py +++ b/sources/pyside2/tests/QtWebKit/bug_803.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.QtWidgets import * from PySide2.QtWebKit import * diff --git a/sources/pyside2/tests/QtWebKit/bug_899.py b/sources/pyside2/tests/QtWebKit/bug_899.py index 681210444..cb8e76784 100644 --- a/sources/pyside2/tests/QtWebKit/bug_899.py +++ b/sources/pyside2/tests/QtWebKit/bug_899.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 Property, QObject from PySide2.QtWebKit import QWebView diff --git a/sources/pyside2/tests/QtWebKit/bug_959.py b/sources/pyside2/tests/QtWebKit/bug_959.py index 6ddf25540..5214ee1e1 100644 --- a/sources/pyside2/tests/QtWebKit/bug_959.py +++ b/sources/pyside2/tests/QtWebKit/bug_959.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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWebKit/qml_plugin_test.py b/sources/pyside2/tests/QtWebKit/qml_plugin_test.py index 5cb6cee57..33497bdc1 100644 --- a/sources/pyside2/tests/QtWebKit/qml_plugin_test.py +++ b/sources/pyside2/tests/QtWebKit/qml_plugin_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 QUrl, QTimer from PySide2.QtWidgets import QApplication, QLabel diff --git a/sources/pyside2/tests/QtWebKit/qvariantlist_property_test.py b/sources/pyside2/tests/QtWebKit/qvariantlist_property_test.py index aeee109d0..6a51a6488 100644 --- a/sources/pyside2/tests/QtWebKit/qvariantlist_property_test.py +++ b/sources/pyside2/tests/QtWebKit/qvariantlist_property_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 Property, QObject from PySide2.QtWebKit import QWebView diff --git a/sources/pyside2/tests/QtWebKit/shouldInterruptjavascript_test.py b/sources/pyside2/tests/QtWebKit/shouldInterruptjavascript_test.py index 722fc63d1..4db5adbb5 100644 --- a/sources/pyside2/tests/QtWebKit/shouldInterruptjavascript_test.py +++ b/sources/pyside2/tests/QtWebKit/shouldInterruptjavascript_test.py @@ -33,7 +33,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 import QtCore, QtWebKit diff --git a/sources/pyside2/tests/QtWebKit/webframe_test.py b/sources/pyside2/tests/QtWebKit/webframe_test.py index b92174c80..d46c1b229 100644 --- a/sources/pyside2/tests/QtWebKit/webframe_test.py +++ b/sources/pyside2/tests/QtWebKit/webframe_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 QObject, SIGNAL, QUrl from PySide2.QtWebKit import * diff --git a/sources/pyside2/tests/QtWebKit/webpage_test.py b/sources/pyside2/tests/QtWebKit/webpage_test.py index 22ad1ff9f..0c37befa2 100644 --- a/sources/pyside2/tests/QtWebKit/webpage_test.py +++ b/sources/pyside2/tests/QtWebKit/webpage_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, QUrl from PySide2.QtWebKit import QWebPage diff --git a/sources/pyside2/tests/QtWebKit/webview_test.py b/sources/pyside2/tests/QtWebKit/webview_test.py index 06e5b7d0f..5ecac5387 100644 --- a/sources/pyside2/tests/QtWebKit/webview_test.py +++ b/sources/pyside2/tests/QtWebKit/webview_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/QtWidgets/action_clear.py b/sources/pyside2/tests/QtWidgets/action_clear.py index b8a6ad590..ed8150493 100644 --- a/sources/pyside2/tests/QtWidgets/action_clear.py +++ b/sources/pyside2/tests/QtWidgets/action_clear.py @@ -31,7 +31,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.QtWidgets import QMenu, QWidget, QMenuBar, QToolBar from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/add_action_test.py b/sources/pyside2/tests/QtWidgets/add_action_test.py index 1dbc5d549..c8a7c2269 100644 --- a/sources/pyside2/tests/QtWidgets/add_action_test.py +++ b/sources/pyside2/tests/QtWidgets/add_action_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 SLOT from PySide2.QtWidgets import QMenuBar, QAction, QPushButton diff --git a/sources/pyside2/tests/QtWidgets/api2_test.py b/sources/pyside2/tests/QtWidgets/api2_test.py index 151ebb9fc..379d3e997 100644 --- a/sources/pyside2/tests/QtWidgets/api2_test.py +++ b/sources/pyside2/tests/QtWidgets/api2_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.QtGui import QIntValidator, QValidator from PySide2.QtWidgets import QWidget, QSpinBox, QApplication diff --git a/sources/pyside2/tests/QtWidgets/application_test.py b/sources/pyside2/tests/QtWidgets/application_test.py index efb41684a..a5b949ec6 100644 --- a/sources/pyside2/tests/QtWidgets/application_test.py +++ b/sources/pyside2/tests/QtWidgets/application_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(True) + from testbinding import TestObject from PySide2.QtWidgets import QApplication from PySide2 import __all__ as all diff --git a/sources/pyside2/tests/QtWidgets/bug_1002.py b/sources/pyside2/tests/QtWidgets/bug_1002.py index c25209d2a..2810ca07f 100644 --- a/sources/pyside2/tests/QtWidgets/bug_1002.py +++ b/sources/pyside2/tests/QtWidgets/bug_1002.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.QtWidgets import QWidget, QPushButton diff --git a/sources/pyside2/tests/QtWidgets/bug_1006.py b/sources/pyside2/tests/QtWidgets/bug_1006.py index 8b7ab7802..f7d4af804 100644 --- a/sources/pyside2/tests/QtWidgets/bug_1006.py +++ b/sources/pyside2/tests/QtWidgets/bug_1006.py @@ -31,7 +31,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 Qt from PySide2.QtWidgets import QDialog, QLabel, QGridLayout, QHBoxLayout, QWidget diff --git a/sources/pyside2/tests/QtWidgets/bug_1048.py b/sources/pyside2/tests/QtWidgets/bug_1048.py index 2042a99c4..1b2189a7a 100644 --- a/sources/pyside2/tests/QtWidgets/bug_1048.py +++ b/sources/pyside2/tests/QtWidgets/bug_1048.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 import QtWidgets a = QtWidgets.QApplication([]) diff --git a/sources/pyside2/tests/QtWidgets/bug_1077.py b/sources/pyside2/tests/QtWidgets/bug_1077.py index 7943e5550..cb3bf70c4 100644 --- a/sources/pyside2/tests/QtWidgets/bug_1077.py +++ b/sources/pyside2/tests/QtWidgets/bug_1077.py @@ -28,9 +28,18 @@ ''' unit test for BUG #1077 ''' -from PySide2 import QtCore, QtGui, QtWidgets +import os +import sys import time +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, QtGui, QtWidgets + + class Highlighter(QtGui.QSyntaxHighlighter): def __init__(self, parent, mode): QtGui.QSyntaxHighlighter.__init__(self, parent) diff --git a/sources/pyside2/tests/QtWidgets/bug_172.py b/sources/pyside2/tests/QtWidgets/bug_172.py index 5b0822555..c9cc8d088 100644 --- a/sources/pyside2/tests/QtWidgets/bug_172.py +++ b/sources/pyside2/tests/QtWidgets/bug_172.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.QtWidgets import * if __name__ == '__main__': diff --git a/sources/pyside2/tests/QtWidgets/bug_243.py b/sources/pyside2/tests/QtWidgets/bug_243.py index 7ce0a468e..bf5fa2eaa 100644 --- a/sources/pyside2/tests/QtWidgets/bug_243.py +++ b/sources/pyside2/tests/QtWidgets/bug_243.py @@ -28,8 +28,13 @@ ''' Test bug 243: http://bugs.openbossa.org/show_bug.cgi?id=243''' -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.QtWidgets import QApplication, QMainWindow, QLayout diff --git a/sources/pyside2/tests/QtWidgets/bug_307.py b/sources/pyside2/tests/QtWidgets/bug_307.py index 0a0e9faa5..d3e8ba9df 100644 --- a/sources/pyside2/tests/QtWidgets/bug_307.py +++ b/sources/pyside2/tests/QtWidgets/bug_307.py @@ -26,8 +26,14 @@ ## ############################################################################# -import unittest import colorsys +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 SIGNAL from PySide2.QtWidgets import QPushButton, QApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_324.py b/sources/pyside2/tests/QtWidgets/bug_324.py index fbaf43738..c6e5a757a 100644 --- a/sources/pyside2/tests/QtWidgets/bug_324.py +++ b/sources/pyside2/tests/QtWidgets/bug_324.py @@ -28,9 +28,14 @@ ''' Test bug 324: http://bugs.openbossa.org/show_bug.cgi?id=324''' -import unittest +import os import sys -import signal +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 * from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/QtWidgets/bug_338.py b/sources/pyside2/tests/QtWidgets/bug_338.py index e51cb1523..ca095a617 100644 --- a/sources/pyside2/tests/QtWidgets/bug_338.py +++ b/sources/pyside2/tests/QtWidgets/bug_338.py @@ -28,9 +28,14 @@ ''' Test bug 338: http://bugs.openbossa.org/show_bug.cgi?id=338''' +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, QtWidgets class DiagramItem(QtWidgets.QGraphicsPolygonItem): diff --git a/sources/pyside2/tests/QtWidgets/bug_363.py b/sources/pyside2/tests/QtWidgets/bug_363.py index a5abb4dbf..910525fed 100644 --- a/sources/pyside2/tests/QtWidgets/bug_363.py +++ b/sources/pyside2/tests/QtWidgets/bug_363.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.usesqapplication import UsesQApplication from PySide2 import QtCore, QtWidgets diff --git a/sources/pyside2/tests/QtWidgets/bug_389.py b/sources/pyside2/tests/QtWidgets/bug_389.py index bd18705a6..dcc4a5df7 100644 --- a/sources/pyside2/tests/QtWidgets/bug_389.py +++ b/sources/pyside2/tests/QtWidgets/bug_389.py @@ -32,7 +32,9 @@ import sys import os 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.usesqapplication import UsesQApplication from PySide2 import QtCore, QtGui, QtWidgets diff --git a/sources/pyside2/tests/QtWidgets/bug_400.py b/sources/pyside2/tests/QtWidgets/bug_400.py index e98ce3d22..03f82a149 100644 --- a/sources/pyside2/tests/QtWidgets/bug_400.py +++ b/sources/pyside2/tests/QtWidgets/bug_400.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.usesqapplication import UsesQApplication from PySide2.QtWidgets import QTreeWidgetItemIterator, QTreeWidgetItem, QTreeWidget diff --git a/sources/pyside2/tests/QtWidgets/bug_416.py b/sources/pyside2/tests/QtWidgets/bug_416.py index f88f3965b..092abebaf 100644 --- a/sources/pyside2/tests/QtWidgets/bug_416.py +++ b/sources/pyside2/tests/QtWidgets/bug_416.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.timedqapplication import TimedQApplication from PySide2.QtCore import QSignalTransition, QState, Qt, QStateMachine diff --git a/sources/pyside2/tests/QtWidgets/bug_429.py b/sources/pyside2/tests/QtWidgets/bug_429.py index dea855f30..9b2fb9c42 100644 --- a/sources/pyside2/tests/QtWidgets/bug_429.py +++ b/sources/pyside2/tests/QtWidgets/bug_429.py @@ -26,9 +26,17 @@ ## ############################################################################# +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 * from PySide2.QtWidgets import * -import sys + app = QApplication(sys.argv) scene = QGraphicsScene() diff --git a/sources/pyside2/tests/QtWidgets/bug_430.py b/sources/pyside2/tests/QtWidgets/bug_430.py index 89f6f795d..81a8d34f6 100644 --- a/sources/pyside2/tests/QtWidgets/bug_430.py +++ b/sources/pyside2/tests/QtWidgets/bug_430.py @@ -26,7 +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 * from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/QtWidgets/bug_433.py b/sources/pyside2/tests/QtWidgets/bug_433.py index a214b2cce..ab316db1e 100644 --- a/sources/pyside2/tests/QtWidgets/bug_433.py +++ b/sources/pyside2/tests/QtWidgets/bug_433.py @@ -26,8 +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 import QtCore, QtWidgets class Test(QtWidgets.QGraphicsView): diff --git a/sources/pyside2/tests/QtWidgets/bug_467.py b/sources/pyside2/tests/QtWidgets/bug_467.py index d26b4424c..ee2da71dc 100644 --- a/sources/pyside2/tests/QtWidgets/bug_467.py +++ b/sources/pyside2/tests/QtWidgets/bug_467.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.usesqapplication import UsesQApplication from PySide2.QtWidgets import QMainWindow, QApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_493.py b/sources/pyside2/tests/QtWidgets/bug_493.py index 19cbb0023..a981952fb 100644 --- a/sources/pyside2/tests/QtWidgets/bug_493.py +++ b/sources/pyside2/tests/QtWidgets/bug_493.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 Qt, QEvent from PySide2.QtGui import QKeyEvent, QKeySequence from PySide2.QtWidgets import QApplication -import unittest class TestBug493(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/bug_512.py b/sources/pyside2/tests/QtWidgets/bug_512.py index 5d1cab9bb..45f127c73 100644 --- a/sources/pyside2/tests/QtWidgets/bug_512.py +++ b/sources/pyside2/tests/QtWidgets/bug_512.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.usesqapplication import UsesQApplication from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtWidgets/bug_525.py b/sources/pyside2/tests/QtWidgets/bug_525.py index 842a4406f..bb0244497 100644 --- a/sources/pyside2/tests/QtWidgets/bug_525.py +++ b/sources/pyside2/tests/QtWidgets/bug_525.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.QtWidgets import QApplication from PySide2.QtWidgets import QMenu diff --git a/sources/pyside2/tests/QtWidgets/bug_546.py b/sources/pyside2/tests/QtWidgets/bug_546.py index a56406cc3..3fadcfaef 100644 --- a/sources/pyside2/tests/QtWidgets/bug_546.py +++ b/sources/pyside2/tests/QtWidgets/bug_546.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.QtWidgets import * class TestBug546(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/bug_547.py b/sources/pyside2/tests/QtWidgets/bug_547.py index ac2000716..070b2f81a 100644 --- a/sources/pyside2/tests/QtWidgets/bug_547.py +++ b/sources/pyside2/tests/QtWidgets/bug_547.py @@ -29,9 +29,15 @@ """ Unittest for bug #547 """ """ http://bugs.openbossa.org/show_bug.cgi?id=547 """ +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 import QtWidgets class MyMainWindow(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/bug_549.py b/sources/pyside2/tests/QtWidgets/bug_549.py index 0e2afc653..7da9cca8f 100644 --- a/sources/pyside2/tests/QtWidgets/bug_549.py +++ b/sources/pyside2/tests/QtWidgets/bug_549.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.QtWidgets import * class TestBug549(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/bug_569.py b/sources/pyside2/tests/QtWidgets/bug_569.py index 4e3d07c35..cf95467c6 100644 --- a/sources/pyside2/tests/QtWidgets/bug_569.py +++ b/sources/pyside2/tests/QtWidgets/bug_569.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 * from PySide2.QtWidgets import * -import unittest class TestBug569(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/bug_575.py b/sources/pyside2/tests/QtWidgets/bug_575.py index 4996c6986..425a659e2 100644 --- a/sources/pyside2/tests/QtWidgets/bug_575.py +++ b/sources/pyside2/tests/QtWidgets/bug_575.py @@ -29,10 +29,18 @@ """ Unittest for bug #575 """ """ http://bugs.openbossa.org/show_bug.cgi?id=575 """ -from PySide2.QtWidgets import QApplication, QPlainTextEdit, QTextEdit +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.QtWidgets import QApplication, QPlainTextEdit, QTextEdit + + class Bug575(unittest.TestCase): def testPropertyValues(self): app = QApplication(sys.argv) diff --git a/sources/pyside2/tests/QtWidgets/bug_576.py b/sources/pyside2/tests/QtWidgets/bug_576.py index b0b044499..9674f7a9d 100644 --- a/sources/pyside2/tests/QtWidgets/bug_576.py +++ b/sources/pyside2/tests/QtWidgets/bug_576.py @@ -29,9 +29,15 @@ """ Unittest for bug #576 """ """ http://bugs.openbossa.org/show_bug.cgi?id=576 """ +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 import QtCore, QtWidgets class Bug576(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/bug_585.py b/sources/pyside2/tests/QtWidgets/bug_585.py index 1c5eb75f1..a0e5c0b5e 100644 --- a/sources/pyside2/tests/QtWidgets/bug_585.py +++ b/sources/pyside2/tests/QtWidgets/bug_585.py @@ -28,9 +28,14 @@ '''Test bug 585: http://bugs.openbossa.org/show_bug.cgi?id=585''' +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, QtWidgets class Bug585(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/bug_589.py b/sources/pyside2/tests/QtWidgets/bug_589.py index c75a12f7f..8f81384a7 100644 --- a/sources/pyside2/tests/QtWidgets/bug_589.py +++ b/sources/pyside2/tests/QtWidgets/bug_589.py @@ -28,10 +28,17 @@ # trimmed down diagramscene.py to demonstrate crash in sizeHint() +import os import sys -from PySide2 import QtCore, QtWidgets 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, QtWidgets + + class CustomWidget(QtWidgets.QGraphicsProxyWidget): def itemChange(self, eventType, value): QtWidgets.QGraphicsProxyWidget.itemChange(self, eventType, value) diff --git a/sources/pyside2/tests/QtWidgets/bug_632.py b/sources/pyside2/tests/QtWidgets/bug_632.py index e60416102..d836b2ff6 100644 --- a/sources/pyside2/tests/QtWidgets/bug_632.py +++ b/sources/pyside2/tests/QtWidgets/bug_632.py @@ -26,10 +26,16 @@ ## ############################################################################# +import os import sys -from PySide2.QtWidgets import QLineEdit, QApplication 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 QLineEdit, QApplication + class Bug589(unittest.TestCase): def testWrongSignature(self): diff --git a/sources/pyside2/tests/QtWidgets/bug_635.py b/sources/pyside2/tests/QtWidgets/bug_635.py index 59f27fa22..6707c3f05 100644 --- a/sources/pyside2/tests/QtWidgets/bug_635.py +++ b/sources/pyside2/tests/QtWidgets/bug_635.py @@ -28,10 +28,17 @@ ''' Test bug 635: http://bugs.openbossa.org/show_bug.cgi?id=635''' +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.QtGui import QIcon from PySide2.QtWidgets import QApplication, QToolBar -import sys + class testQToolBar(unittest.TestCase): def callback(self): diff --git a/sources/pyside2/tests/QtWidgets/bug_640.py b/sources/pyside2/tests/QtWidgets/bug_640.py index 9e63a1d7f..13d98aa47 100644 --- a/sources/pyside2/tests/QtWidgets/bug_640.py +++ b/sources/pyside2/tests/QtWidgets/bug_640.py @@ -26,10 +26,17 @@ ## ############################################################################# +import os import sys -from PySide2.QtWidgets import * 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 * + + class Bug640(unittest.TestCase): def testIt(self): option = QStyleOptionGraphicsItem() diff --git a/sources/pyside2/tests/QtWidgets/bug_653.py b/sources/pyside2/tests/QtWidgets/bug_653.py index e1b2ed416..df7dbacdb 100644 --- a/sources/pyside2/tests/QtWidgets/bug_653.py +++ b/sources/pyside2/tests/QtWidgets/bug_653.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 * from PySide2.QtWidgets import * @@ -42,4 +49,4 @@ class TestBug653(unittest.TestCase): wizard.show() if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() diff --git a/sources/pyside2/tests/QtWidgets/bug_662.py b/sources/pyside2/tests/QtWidgets/bug_662.py index a5cc650c1..7fb97deb6 100644 --- a/sources/pyside2/tests/QtWidgets/bug_662.py +++ b/sources/pyside2/tests/QtWidgets/bug_662.py @@ -28,7 +28,13 @@ ''' Test bug 662: http://bugs.openbossa.org/show_bug.cgi?id=662''' +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.QtGui import QTextCharFormat from PySide2.QtWidgets import QTextEdit, QApplication import sys diff --git a/sources/pyside2/tests/QtWidgets/bug_667.py b/sources/pyside2/tests/QtWidgets/bug_667.py index e2b472299..cbbd57c20 100644 --- a/sources/pyside2/tests/QtWidgets/bug_667.py +++ b/sources/pyside2/tests/QtWidgets/bug_667.py @@ -26,8 +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 QTimer, QPointF from PySide2.QtWidgets import QApplication, QGraphicsView, QGraphicsScene, QGraphicsEllipseItem diff --git a/sources/pyside2/tests/QtWidgets/bug_668.py b/sources/pyside2/tests/QtWidgets/bug_668.py index 05cffa39d..42d956257 100644 --- a/sources/pyside2/tests/QtWidgets/bug_668.py +++ b/sources/pyside2/tests/QtWidgets/bug_668.py @@ -28,10 +28,17 @@ ## ############################################################################# +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 * from PySide2.QtWidgets import * -import sys class A(QMainWindow): def __init__(self, parent=None): diff --git a/sources/pyside2/tests/QtWidgets/bug_674.py b/sources/pyside2/tests/QtWidgets/bug_674.py index 40fd19206..1c8f55338 100644 --- a/sources/pyside2/tests/QtWidgets/bug_674.py +++ b/sources/pyside2/tests/QtWidgets/bug_674.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 * from PySide2.QtWidgets import * -import unittest -import sys + class TestBug679(unittest.TestCase): '''QGraphicsScene::clear() is missing''' diff --git a/sources/pyside2/tests/QtWidgets/bug_675.py b/sources/pyside2/tests/QtWidgets/bug_675.py index 93489064b..1e54f1b8f 100644 --- a/sources/pyside2/tests/QtWidgets/bug_675.py +++ b/sources/pyside2/tests/QtWidgets/bug_675.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 * from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/QtWidgets/bug_688.py b/sources/pyside2/tests/QtWidgets/bug_688.py index 4627d8042..97d62e2c9 100644 --- a/sources/pyside2/tests/QtWidgets/bug_688.py +++ b/sources/pyside2/tests/QtWidgets/bug_688.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.usesqapplication import UsesQApplication from PySide2.QtGui import QTextFrame, QTextCursor, QTextCharFormat, QFont, QTextFrameFormat diff --git a/sources/pyside2/tests/QtWidgets/bug_693.py b/sources/pyside2/tests/QtWidgets/bug_693.py index 31b0262c4..68d19e00f 100644 --- a/sources/pyside2/tests/QtWidgets/bug_693.py +++ b/sources/pyside2/tests/QtWidgets/bug_693.py @@ -26,9 +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 * from PySide2.QtWidgets import * -import unittest + class MyModel (QAbstractListModel): diff --git a/sources/pyside2/tests/QtWidgets/bug_696.py b/sources/pyside2/tests/QtWidgets/bug_696.py index 5af193ffc..abd4246a5 100644 --- a/sources/pyside2/tests/QtWidgets/bug_696.py +++ b/sources/pyside2/tests/QtWidgets/bug_696.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.usesqapplication import UsesQApplication from PySide2.QtWidgets import QMainWindow, QMenu, QApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_711.py b/sources/pyside2/tests/QtWidgets/bug_711.py index 073d4e3c8..43e4b7bb2 100644 --- a/sources/pyside2/tests/QtWidgets/bug_711.py +++ b/sources/pyside2/tests/QtWidgets/bug_711.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.QtWidgets import QToolBar, QApplication, QAction, QToolButton try: diff --git a/sources/pyside2/tests/QtWidgets/bug_714.py b/sources/pyside2/tests/QtWidgets/bug_714.py index 345207ff9..76cf0295b 100644 --- a/sources/pyside2/tests/QtWidgets/bug_714.py +++ b/sources/pyside2/tests/QtWidgets/bug_714.py @@ -26,8 +26,14 @@ ## ############################################################################# -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.QtGui import QPixmap from PySide2.QtWidgets import QLabel, QApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_722.py b/sources/pyside2/tests/QtWidgets/bug_722.py index 1cdf7ff43..7eae897dc 100644 --- a/sources/pyside2/tests/QtWidgets/bug_722.py +++ b/sources/pyside2/tests/QtWidgets/bug_722.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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_728.py b/sources/pyside2/tests/QtWidgets/bug_728.py index 59269d72c..5cd39b66f 100644 --- a/sources/pyside2/tests/QtWidgets/bug_728.py +++ b/sources/pyside2/tests/QtWidgets/bug_728.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.QtWidgets import * from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtWidgets/bug_736.py b/sources/pyside2/tests/QtWidgets/bug_736.py index 31ce80e57..4e040f965 100644 --- a/sources/pyside2/tests/QtWidgets/bug_736.py +++ b/sources/pyside2/tests/QtWidgets/bug_736.py @@ -26,7 +26,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.QtCore import * from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/QtWidgets/bug_750.py b/sources/pyside2/tests/QtWidgets/bug_750.py index 78d333efd..20f2d5d58 100644 --- a/sources/pyside2/tests/QtWidgets/bug_750.py +++ b/sources/pyside2/tests/QtWidgets/bug_750.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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_778.py b/sources/pyside2/tests/QtWidgets/bug_778.py index c5615b06f..148ae5ae5 100644 --- a/sources/pyside2/tests/QtWidgets/bug_778.py +++ b/sources/pyside2/tests/QtWidgets/bug_778.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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_785.py b/sources/pyside2/tests/QtWidgets/bug_785.py index 312b17996..ba18a99a1 100644 --- a/sources/pyside2/tests/QtWidgets/bug_785.py +++ b/sources/pyside2/tests/QtWidgets/bug_785.py @@ -26,9 +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 QItemSelection from PySide2.QtGui import QStandardItemModel, QStandardItem from PySide2.QtWidgets import QApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_793.py b/sources/pyside2/tests/QtWidgets/bug_793.py index 3d63cae2e..37eddfd57 100644 --- a/sources/pyside2/tests/QtWidgets/bug_793.py +++ b/sources/pyside2/tests/QtWidgets/bug_793.py @@ -26,8 +26,14 @@ ## ############################################################################# -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 QTimer from PySide2.QtWidgets import QWidget, QApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_811.py b/sources/pyside2/tests/QtWidgets/bug_811.py index aa0ebfae5..fd618fba3 100644 --- a/sources/pyside2/tests/QtWidgets/bug_811.py +++ b/sources/pyside2/tests/QtWidgets/bug_811.py @@ -31,7 +31,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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/bug_834.py b/sources/pyside2/tests/QtWidgets/bug_834.py index 129da321c..9dba711ed 100644 --- a/sources/pyside2/tests/QtWidgets/bug_834.py +++ b/sources/pyside2/tests/QtWidgets/bug_834.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 import QtCore, QtWidgets class Window(QtWidgets.QMainWindow): diff --git a/sources/pyside2/tests/QtWidgets/bug_836.py b/sources/pyside2/tests/QtWidgets/bug_836.py index 69e23e2dc..4d995ddcb 100644 --- a/sources/pyside2/tests/QtWidgets/bug_836.py +++ b/sources/pyside2/tests/QtWidgets/bug_836.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 * from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/QtWidgets/bug_844.py b/sources/pyside2/tests/QtWidgets/bug_844.py index 822863294..a14e3afc3 100644 --- a/sources/pyside2/tests/QtWidgets/bug_844.py +++ b/sources/pyside2/tests/QtWidgets/bug_844.py @@ -26,6 +26,14 @@ ## ############################################################################# +import sys +import os + +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.QtWidgets import * from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtWidgets/bug_854.py b/sources/pyside2/tests/QtWidgets/bug_854.py index 60d843b64..acfa1c270 100644 --- a/sources/pyside2/tests/QtWidgets/bug_854.py +++ b/sources/pyside2/tests/QtWidgets/bug_854.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.QtWidgets import QTableView, QVBoxLayout, QApplication from PySide2.QtCore import QAbstractItemModel diff --git a/sources/pyside2/tests/QtWidgets/bug_860.py b/sources/pyside2/tests/QtWidgets/bug_860.py index 7440b2613..8cdab2e45 100644 --- a/sources/pyside2/tests/QtWidgets/bug_860.py +++ b/sources/pyside2/tests/QtWidgets/bug_860.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 QSignalMapper from PySide2.QtWidgets import QCheckBox diff --git a/sources/pyside2/tests/QtWidgets/bug_862.py b/sources/pyside2/tests/QtWidgets/bug_862.py index 4621fc3b4..96aeb6f14 100644 --- a/sources/pyside2/tests/QtWidgets/bug_862.py +++ b/sources/pyside2/tests/QtWidgets/bug_862.py @@ -48,11 +48,18 @@ # <__main__.MyQGraphicsItem object at 0x7f55cf226c20> # +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 from PySide2.QtWidgets import * import PySide2.QtCore -import unittest + class MyQObject(QObject): def __init__(self): diff --git a/sources/pyside2/tests/QtWidgets/bug_871.py b/sources/pyside2/tests/QtWidgets/bug_871.py index a3759cb97..4a53b98aa 100644 --- a/sources/pyside2/tests/QtWidgets/bug_871.py +++ b/sources/pyside2/tests/QtWidgets/bug_871.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 helper.usesqapplication import UsesQApplication from PySide2.QtGui import QValidator, QIntValidator diff --git a/sources/pyside2/tests/QtWidgets/bug_879.py b/sources/pyside2/tests/QtWidgets/bug_879.py index 59eb979aa..981be0390 100644 --- a/sources/pyside2/tests/QtWidgets/bug_879.py +++ b/sources/pyside2/tests/QtWidgets/bug_879.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, QTimer, QEvent, Qt from PySide2.QtWidgets import QApplication, QSpinBox from PySide2.QtGui import QKeyEvent diff --git a/sources/pyside2/tests/QtWidgets/bug_919.py b/sources/pyside2/tests/QtWidgets/bug_919.py index 4ef133fa3..40ba94d2e 100644 --- a/sources/pyside2/tests/QtWidgets/bug_919.py +++ b/sources/pyside2/tests/QtWidgets/bug_919.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 helper.timedqapplication import TimedQApplication from PySide2.QtCore import Signal, QTimer diff --git a/sources/pyside2/tests/QtWidgets/bug_921.py b/sources/pyside2/tests/QtWidgets/bug_921.py index 9380a08f1..56abe0970 100644 --- a/sources/pyside2/tests/QtWidgets/bug_921.py +++ b/sources/pyside2/tests/QtWidgets/bug_921.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 import QtCore, QtWidgets diff --git a/sources/pyside2/tests/QtWidgets/bug_941.py b/sources/pyside2/tests/QtWidgets/bug_941.py index 562be9a3b..074fde8e6 100644 --- a/sources/pyside2/tests/QtWidgets/bug_941.py +++ b/sources/pyside2/tests/QtWidgets/bug_941.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 * from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/QtWidgets/bug_964.py b/sources/pyside2/tests/QtWidgets/bug_964.py index 9c7af6c53..a160afd1b 100644 --- a/sources/pyside2/tests/QtWidgets/bug_964.py +++ b/sources/pyside2/tests/QtWidgets/bug_964.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 * from PySide2.QtGui import * from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/QtWidgets/bug_967.py b/sources/pyside2/tests/QtWidgets/bug_967.py index 643041100..19d6b1e43 100644 --- a/sources/pyside2/tests/QtWidgets/bug_967.py +++ b/sources/pyside2/tests/QtWidgets/bug_967.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.QtWidgets import * class TestBug967 (unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/bug_972.py b/sources/pyside2/tests/QtWidgets/bug_972.py index a5299eebc..15bf949a8 100644 --- a/sources/pyside2/tests/QtWidgets/bug_972.py +++ b/sources/pyside2/tests/QtWidgets/bug_972.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 QSizeF from PySide2.QtWidgets import QGraphicsProxyWidget, QSizePolicy, QPushButton, QGraphicsScene, QGraphicsView diff --git a/sources/pyside2/tests/QtWidgets/bug_979.py b/sources/pyside2/tests/QtWidgets/bug_979.py index 4bc0c966e..c5d65c361 100644 --- a/sources/pyside2/tests/QtWidgets/bug_979.py +++ b/sources/pyside2/tests/QtWidgets/bug_979.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.QtWidgets import QDialog from import_test import PysideImportTest2 diff --git a/sources/pyside2/tests/QtWidgets/bug_988.py b/sources/pyside2/tests/QtWidgets/bug_988.py index e74edac82..93c2cc1aa 100644 --- a/sources/pyside2/tests/QtWidgets/bug_988.py +++ b/sources/pyside2/tests/QtWidgets/bug_988.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.QtWidgets import * class TestBug988 (unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/bug_998.py b/sources/pyside2/tests/QtWidgets/bug_998.py index 8e0c96e5f..7c7587dd2 100644 --- a/sources/pyside2/tests/QtWidgets/bug_998.py +++ b/sources/pyside2/tests/QtWidgets/bug_998.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.QtWidgets import QApplication class TestBug998 (unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/customproxywidget_test.py b/sources/pyside2/tests/QtWidgets/customproxywidget_test.py index 051f31a71..7082fb12c 100644 --- a/sources/pyside2/tests/QtWidgets/customproxywidget_test.py +++ b/sources/pyside2/tests/QtWidgets/customproxywidget_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 helper.usesqapplication import UsesQApplication from PySide2.QtCore import Qt, QTimer diff --git a/sources/pyside2/tests/QtWidgets/event_filter_test.py b/sources/pyside2/tests/QtWidgets/event_filter_test.py index a367c0349..fe18a3646 100644 --- a/sources/pyside2/tests/QtWidgets/event_filter_test.py +++ b/sources/pyside2/tests/QtWidgets/event_filter_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 helper.usesqapplication import UsesQApplication from PySide2.QtCore import QObject, QEvent diff --git a/sources/pyside2/tests/QtWidgets/grandparent_method_test.py b/sources/pyside2/tests/QtWidgets/grandparent_method_test.py index 6e64a047b..6b8fcbab5 100644 --- a/sources/pyside2/tests/QtWidgets/grandparent_method_test.py +++ b/sources/pyside2/tests/QtWidgets/grandparent_method_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.QtWidgets import QPushButton, QWidget diff --git a/sources/pyside2/tests/QtWidgets/hashabletype_test.py b/sources/pyside2/tests/QtWidgets/hashabletype_test.py index 356afd8b9..0c3f045ce 100644 --- a/sources/pyside2/tests/QtWidgets/hashabletype_test.py +++ b/sources/pyside2/tests/QtWidgets/hashabletype_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.QtWidgets import QTreeWidgetItem from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/keep_reference_test.py b/sources/pyside2/tests/QtWidgets/keep_reference_test.py index c250da24b..c0139ed9f 100644 --- a/sources/pyside2/tests/QtWidgets/keep_reference_test.py +++ b/sources/pyside2/tests/QtWidgets/keep_reference_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 sys import getrefcount from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/missing_symbols_test.py b/sources/pyside2/tests/QtWidgets/missing_symbols_test.py index de243c4b2..064ed0b7c 100644 --- a/sources/pyside2/tests/QtWidgets/missing_symbols_test.py +++ b/sources/pyside2/tests/QtWidgets/missing_symbols_test.py @@ -28,7 +28,14 @@ '''(Very) Simple test case for missing names from QtGui and QtWidgets''' +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 QtGui from PySide2 import QtWidgets diff --git a/sources/pyside2/tests/QtWidgets/paint_event_test.py b/sources/pyside2/tests/QtWidgets/paint_event_test.py index 1b715ce27..d57a523eb 100644 --- a/sources/pyside2/tests/QtWidgets/paint_event_test.py +++ b/sources/pyside2/tests/QtWidgets/paint_event_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 QTimerEvent from PySide2.QtWidgets import QApplication, QWidget diff --git a/sources/pyside2/tests/QtWidgets/parent_method_test.py b/sources/pyside2/tests/QtWidgets/parent_method_test.py index 2f00a72d1..ef8e9ca8c 100644 --- a/sources/pyside2/tests/QtWidgets/parent_method_test.py +++ b/sources/pyside2/tests/QtWidgets/parent_method_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 QObject, QTimer, QThread from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/QtWidgets/private_mangle_test.py b/sources/pyside2/tests/QtWidgets/private_mangle_test.py index 5ad10c7b3..75545537b 100644 --- a/sources/pyside2/tests/QtWidgets/private_mangle_test.py +++ b/sources/pyside2/tests/QtWidgets/private_mangle_test.py @@ -42,7 +42,14 @@ This is the example from https://bugreports.qt.io/browse/PYSIDE-772 with no interaction as a 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 Signal from PySide2.QtWidgets import QApplication, QWidget from PySide2 import QtWidgets diff --git a/sources/pyside2/tests/QtWidgets/python_properties_test.py b/sources/pyside2/tests/QtWidgets/python_properties_test.py index f4e46f2bd..fb1679297 100644 --- a/sources/pyside2/tests/QtWidgets/python_properties_test.py +++ b/sources/pyside2/tests/QtWidgets/python_properties_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, QtWidgets class Properties(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/qabstracttextdocumentlayout_test.py b/sources/pyside2/tests/QtWidgets/qabstracttextdocumentlayout_test.py index c08c9e95b..8e291bb63 100644 --- a/sources/pyside2/tests/QtWidgets/qabstracttextdocumentlayout_test.py +++ b/sources/pyside2/tests/QtWidgets/qabstracttextdocumentlayout_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 py3kcompat as py3k diff --git a/sources/pyside2/tests/QtWidgets/qaction_test.py b/sources/pyside2/tests/QtWidgets/qaction_test.py index 7ee74fffa..8fc8f6c05 100644 --- a/sources/pyside2/tests/QtWidgets/qaction_test.py +++ b/sources/pyside2/tests/QtWidgets/qaction_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.QtWidgets import QAction, QWidget from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qapp_issue_585.py b/sources/pyside2/tests/QtWidgets/qapp_issue_585.py index f124ee6a6..d7afdec3a 100644 --- a/sources/pyside2/tests/QtWidgets/qapp_issue_585.py +++ b/sources/pyside2/tests/QtWidgets/qapp_issue_585.py @@ -58,6 +58,14 @@ For some reason, the test does not work as a unittest because it creates no crash. We leave it this way. """ +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 QTimer from PySide2 import QtWidgets diff --git a/sources/pyside2/tests/QtWidgets/qapp_test.py b/sources/pyside2/tests/QtWidgets/qapp_test.py index 0bd919318..cda34be77 100644 --- a/sources/pyside2/tests/QtWidgets/qapp_test.py +++ b/sources/pyside2/tests/QtWidgets/qapp_test.py @@ -28,8 +28,14 @@ ''' Test the presence of qApp Macro''' +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.QtWidgets import * class QAppPresence(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/qapplication_exit_segfault_test.py b/sources/pyside2/tests/QtWidgets/qapplication_exit_segfault_test.py index f74ced668..f70086460 100644 --- a/sources/pyside2/tests/QtWidgets/qapplication_exit_segfault_test.py +++ b/sources/pyside2/tests/QtWidgets/qapplication_exit_segfault_test.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.QtWidgets import QApplication, QPushButton, QWidget, QSpinBox diff --git a/sources/pyside2/tests/QtWidgets/qapplication_test.py b/sources/pyside2/tests/QtWidgets/qapplication_test.py index b29aba6ac..0fc174e8f 100644 --- a/sources/pyside2/tests/QtWidgets/qapplication_test.py +++ b/sources/pyside2/tests/QtWidgets/qapplication_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.QtWidgets import QApplication class TestQApplication(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/qbrush_test.py b/sources/pyside2/tests/QtWidgets/qbrush_test.py index 78f32c7bc..97b1e824a 100644 --- a/sources/pyside2/tests/QtWidgets/qbrush_test.py +++ b/sources/pyside2/tests/QtWidgets/qbrush_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 Qt from PySide2.QtGui import QColor, QBrush diff --git a/sources/pyside2/tests/QtWidgets/qcolormap_test.py b/sources/pyside2/tests/QtWidgets/qcolormap_test.py index 6166b32fb..1123b0d21 100644 --- a/sources/pyside2/tests/QtWidgets/qcolormap_test.py +++ b/sources/pyside2/tests/QtWidgets/qcolormap_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.QtWidgets import QColormap from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qdynamic_signal.py b/sources/pyside2/tests/QtWidgets/qdynamic_signal.py index 3b14ab3fb..4b9f76333 100644 --- a/sources/pyside2/tests/QtWidgets/qdynamic_signal.py +++ b/sources/pyside2/tests/QtWidgets/qdynamic_signal.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 QObject from PySide2.QtWidgets import QInputDialog diff --git a/sources/pyside2/tests/QtWidgets/qfontdialog_test.py b/sources/pyside2/tests/QtWidgets/qfontdialog_test.py index 97fe9d797..b9706e4e7 100644 --- a/sources/pyside2/tests/QtWidgets/qfontdialog_test.py +++ b/sources/pyside2/tests/QtWidgets/qfontdialog_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 import QtCore from PySide2 import QtGui diff --git a/sources/pyside2/tests/QtWidgets/qformlayout_test.py b/sources/pyside2/tests/QtWidgets/qformlayout_test.py index 0b38f675d..ff5a13aeb 100644 --- a/sources/pyside2/tests/QtWidgets/qformlayout_test.py +++ b/sources/pyside2/tests/QtWidgets/qformlayout_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.QtWidgets import QFormLayout, QWidget diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py index 524ca6fa8..e40dff6f6 100644 --- a/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py +++ b/sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_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 import QtCore from PySide2 import QtGui diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsitem_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsitem_test.py index 8787b6178..27d543a7f 100644 --- a/sources/pyside2/tests/QtWidgets/qgraphicsitem_test.py +++ b/sources/pyside2/tests/QtWidgets/qgraphicsitem_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.QtGui import QPolygonF, QColor, QBrush from PySide2.QtWidgets import QGraphicsScene diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py index 11825e42e..46569cc1e 100644 --- a/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py +++ b/sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_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.QtWidgets import QGraphicsObject, QGraphicsWidget from PySide2.QtCore import QRectF diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsproxywidget_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsproxywidget_test.py index 59796142d..54f95880e 100644 --- a/sources/pyside2/tests/QtWidgets/qgraphicsproxywidget_test.py +++ b/sources/pyside2/tests/QtWidgets/qgraphicsproxywidget_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 helper.usesqapplication import UsesQApplication from PySide2.QtCore import Qt, QTimer diff --git a/sources/pyside2/tests/QtWidgets/qgraphicsscene_test.py b/sources/pyside2/tests/QtWidgets/qgraphicsscene_test.py index 8c521369d..cb1867b88 100644 --- a/sources/pyside2/tests/QtWidgets/qgraphicsscene_test.py +++ b/sources/pyside2/tests/QtWidgets/qgraphicsscene_test.py @@ -33,7 +33,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 QPointF from PySide2.QtGui import QPolygonF, QPixmap, QPainterPath, QTransform, QWindow diff --git a/sources/pyside2/tests/QtWidgets/qimage_test.py b/sources/pyside2/tests/QtWidgets/qimage_test.py index 51f4fcd57..8bb83c51a 100644 --- a/sources/pyside2/tests/QtWidgets/qimage_test.py +++ b/sources/pyside2/tests/QtWidgets/qimage_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 from PySide2.QtGui import * diff --git a/sources/pyside2/tests/QtWidgets/qinputdialog_get_test.py b/sources/pyside2/tests/QtWidgets/qinputdialog_get_test.py index 69d1613b6..0aaf548c9 100644 --- a/sources/pyside2/tests/QtWidgets/qinputdialog_get_test.py +++ b/sources/pyside2/tests/QtWidgets/qinputdialog_get_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 import QtCore, QtWidgets from helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtWidgets/qkeysequenceedit_test.py b/sources/pyside2/tests/QtWidgets/qkeysequenceedit_test.py index d85d20aa2..150eb3d31 100644 --- a/sources/pyside2/tests/QtWidgets/qkeysequenceedit_test.py +++ b/sources/pyside2/tests/QtWidgets/qkeysequenceedit_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 QTimer from PySide2.QtWidgets import QKeySequenceEdit diff --git a/sources/pyside2/tests/QtWidgets/qlabel_test.py b/sources/pyside2/tests/QtWidgets/qlabel_test.py index c8e8e2619..19387dee9 100644 --- a/sources/pyside2/tests/QtWidgets/qlabel_test.py +++ b/sources/pyside2/tests/QtWidgets/qlabel_test.py @@ -28,8 +28,14 @@ '''Test cases for QLabel''' +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(True) + from PySide2.QtGui import QPixmap from PySide2.QtWidgets import QLabel import shiboken2 as shiboken diff --git a/sources/pyside2/tests/QtWidgets/qlayout_ref_test.py b/sources/pyside2/tests/QtWidgets/qlayout_ref_test.py index 09b808794..9f0b4cca3 100644 --- a/sources/pyside2/tests/QtWidgets/qlayout_ref_test.py +++ b/sources/pyside2/tests/QtWidgets/qlayout_ref_test.py @@ -33,7 +33,9 @@ import sys from sys import getrefcount 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.QtWidgets import QHBoxLayout, QVBoxLayout, QGridLayout, QWidget from PySide2.QtWidgets import QStackedLayout, QFormLayout diff --git a/sources/pyside2/tests/QtWidgets/qlayout_test.py b/sources/pyside2/tests/QtWidgets/qlayout_test.py index 8077e3bd3..3882761ea 100644 --- a/sources/pyside2/tests/QtWidgets/qlayout_test.py +++ b/sources/pyside2/tests/QtWidgets/qlayout_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 helper.usesqapplication import UsesQApplication from PySide2.QtCore import * diff --git a/sources/pyside2/tests/QtWidgets/qlcdnumber_test.py b/sources/pyside2/tests/QtWidgets/qlcdnumber_test.py index 6da0a31b8..e079d6dd5 100644 --- a/sources/pyside2/tests/QtWidgets/qlcdnumber_test.py +++ b/sources/pyside2/tests/QtWidgets/qlcdnumber_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.QtWidgets import QApplication, QLCDNumber class QLCDNumberOverflow(unittest.TestCase): diff --git a/sources/pyside2/tests/QtWidgets/qlistwidget_test.py b/sources/pyside2/tests/QtWidgets/qlistwidget_test.py index 6fab3fb34..732f3859c 100644 --- a/sources/pyside2/tests/QtWidgets/qlistwidget_test.py +++ b/sources/pyside2/tests/QtWidgets/qlistwidget_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 import QtWidgets, QtCore from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qlistwidgetitem_test.py b/sources/pyside2/tests/QtWidgets/qlistwidgetitem_test.py index 2da159bce..b23852698 100644 --- a/sources/pyside2/tests/QtWidgets/qlistwidgetitem_test.py +++ b/sources/pyside2/tests/QtWidgets/qlistwidgetitem_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 import QtWidgets diff --git a/sources/pyside2/tests/QtWidgets/qmainwindow_test.py b/sources/pyside2/tests/QtWidgets/qmainwindow_test.py index 50c992f1a..c1cd106bd 100644 --- a/sources/pyside2/tests/QtWidgets/qmainwindow_test.py +++ b/sources/pyside2/tests/QtWidgets/qmainwindow_test.py @@ -31,7 +31,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 import QtWidgets from PySide2 import QtCore diff --git a/sources/pyside2/tests/QtWidgets/qmenu_test.py b/sources/pyside2/tests/QtWidgets/qmenu_test.py index c1d03393c..9c5b12b25 100644 --- a/sources/pyside2/tests/QtWidgets/qmenu_test.py +++ b/sources/pyside2/tests/QtWidgets/qmenu_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.QtWidgets import QMenu from PySide2.QtGui import QKeySequence, QIcon diff --git a/sources/pyside2/tests/QtWidgets/qmenuadd_test.py b/sources/pyside2/tests/QtWidgets/qmenuadd_test.py index c2881b206..f4ecbb398 100644 --- a/sources/pyside2/tests/QtWidgets/qmenuadd_test.py +++ b/sources/pyside2/tests/QtWidgets/qmenuadd_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 import QtWidgets diff --git a/sources/pyside2/tests/QtWidgets/qobject_mi_test.py b/sources/pyside2/tests/QtWidgets/qobject_mi_test.py index 032229e4e..6934229cd 100644 --- a/sources/pyside2/tests/QtWidgets/qobject_mi_test.py +++ b/sources/pyside2/tests/QtWidgets/qobject_mi_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 from PySide2.QtGui import * diff --git a/sources/pyside2/tests/QtWidgets/qpen_test.py b/sources/pyside2/tests/QtWidgets/qpen_test.py index 9469cb10c..0acb8c27b 100644 --- a/sources/pyside2/tests/QtWidgets/qpen_test.py +++ b/sources/pyside2/tests/QtWidgets/qpen_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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qpicture_test.py b/sources/pyside2/tests/QtWidgets/qpicture_test.py index 002be64e5..3a5747e4a 100644 --- a/sources/pyside2/tests/QtWidgets/qpicture_test.py +++ b/sources/pyside2/tests/QtWidgets/qpicture_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 helper.usesqapplication import UsesQApplication from PySide2.QtCore import QTimer diff --git a/sources/pyside2/tests/QtWidgets/qpixmap_constructor.py b/sources/pyside2/tests/QtWidgets/qpixmap_constructor.py index 7e44e92b1..38f9b4adc 100644 --- a/sources/pyside2/tests/QtWidgets/qpixmap_constructor.py +++ b/sources/pyside2/tests/QtWidgets/qpixmap_constructor.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.QtGui import QPixmap from PySide2.QtWidgets import QLabel diff --git a/sources/pyside2/tests/QtWidgets/qpushbutton_test.py b/sources/pyside2/tests/QtWidgets/qpushbutton_test.py index 7fb17d922..896d4935c 100644 --- a/sources/pyside2/tests/QtWidgets/qpushbutton_test.py +++ b/sources/pyside2/tests/QtWidgets/qpushbutton_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 helper.usesqapplication import UsesQApplication from PySide2.QtWidgets import QPushButton, QMenu, QWidget diff --git a/sources/pyside2/tests/QtWidgets/qshortcut_test.py b/sources/pyside2/tests/QtWidgets/qshortcut_test.py index 7faaf6f92..18aec285d 100644 --- a/sources/pyside2/tests/QtWidgets/qshortcut_test.py +++ b/sources/pyside2/tests/QtWidgets/qshortcut_test.py @@ -30,8 +30,13 @@ ''' Test the QShortcut constructor''' -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 import QtCore, QtGui, QtWidgets diff --git a/sources/pyside2/tests/QtWidgets/qsplitter_test.py b/sources/pyside2/tests/QtWidgets/qsplitter_test.py index 2c792a63f..f375c820d 100644 --- a/sources/pyside2/tests/QtWidgets/qsplitter_test.py +++ b/sources/pyside2/tests/QtWidgets/qsplitter_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.QtWidgets import QSplitter diff --git a/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py b/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py index 5b41af467..f1c360b82 100644 --- a/sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py +++ b/sources/pyside2/tests/QtWidgets/qstandarditemmodel_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.QtGui import QStandardItemModel, QStandardItem from PySide2.QtWidgets import QWidget diff --git a/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py b/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py index 80eba412c..0321b69a4 100644 --- a/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py +++ b/sources/pyside2/tests/QtWidgets/qstring_qkeysequence_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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qstyle_test.py b/sources/pyside2/tests/QtWidgets/qstyle_test.py index 0452ca0fa..60130a14c 100644 --- a/sources/pyside2/tests/QtWidgets/qstyle_test.py +++ b/sources/pyside2/tests/QtWidgets/qstyle_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 helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qtableview_test.py b/sources/pyside2/tests/QtWidgets/qtableview_test.py index e97c5567c..040f8b91a 100644 --- a/sources/pyside2/tests/QtWidgets/qtableview_test.py +++ b/sources/pyside2/tests/QtWidgets/qtableview_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 QAbstractTableModel from PySide2.QtWidgets import QTableWidget diff --git a/sources/pyside2/tests/QtWidgets/qtabwidget_test.py b/sources/pyside2/tests/QtWidgets/qtabwidget_test.py index 5b2ebbdea..fc4f98c1d 100644 --- a/sources/pyside2/tests/QtWidgets/qtabwidget_test.py +++ b/sources/pyside2/tests/QtWidgets/qtabwidget_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.QtWidgets import * from helper.timedqapplication import TimedQApplication diff --git a/sources/pyside2/tests/QtWidgets/qtabwidgetclear_test.py b/sources/pyside2/tests/QtWidgets/qtabwidgetclear_test.py index 75e0e4dab..c0c25d955 100644 --- a/sources/pyside2/tests/QtWidgets/qtabwidgetclear_test.py +++ b/sources/pyside2/tests/QtWidgets/qtabwidgetclear_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.QtWidgets import QMainWindow, QTabWidget, QTextEdit, QSplitter from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qtextedit_signal_test.py b/sources/pyside2/tests/QtWidgets/qtextedit_signal_test.py index aa10fb9d0..aef06448b 100644 --- a/sources/pyside2/tests/QtWidgets/qtextedit_signal_test.py +++ b/sources/pyside2/tests/QtWidgets/qtextedit_signal_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 import QtCore, QtWidgets from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qtextedit_test.py b/sources/pyside2/tests/QtWidgets/qtextedit_test.py index d809ebfc6..d06cb4f83 100644 --- a/sources/pyside2/tests/QtWidgets/qtextedit_test.py +++ b/sources/pyside2/tests/QtWidgets/qtextedit_test.py @@ -33,7 +33,9 @@ import sys from sys import getrefcount 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.QtWidgets import QTextEdit diff --git a/sources/pyside2/tests/QtWidgets/qtoolbar_test.py b/sources/pyside2/tests/QtWidgets/qtoolbar_test.py index 956c72ee3..856bf07f3 100644 --- a/sources/pyside2/tests/QtWidgets/qtoolbar_test.py +++ b/sources/pyside2/tests/QtWidgets/qtoolbar_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.QtWidgets import QToolBar, QMainWindow, QAction diff --git a/sources/pyside2/tests/QtWidgets/qtoolbox_test.py b/sources/pyside2/tests/QtWidgets/qtoolbox_test.py index e9cf086a6..9fdd53958 100644 --- a/sources/pyside2/tests/QtWidgets/qtoolbox_test.py +++ b/sources/pyside2/tests/QtWidgets/qtoolbox_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.QtGui import QIcon from PySide2.QtWidgets import QToolBox, QWidget diff --git a/sources/pyside2/tests/QtWidgets/qtreeview_test.py b/sources/pyside2/tests/QtWidgets/qtreeview_test.py index 6673d36b9..8824088d4 100644 --- a/sources/pyside2/tests/QtWidgets/qtreeview_test.py +++ b/sources/pyside2/tests/QtWidgets/qtreeview_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.QtGui import QStandardItemModel from PySide2.QtWidgets import (QWidget, QTreeView, QVBoxLayout, diff --git a/sources/pyside2/tests/QtWidgets/qtreewidget_test.py b/sources/pyside2/tests/QtWidgets/qtreewidget_test.py index ec3724f6c..6700f82c9 100644 --- a/sources/pyside2/tests/QtWidgets/qtreewidget_test.py +++ b/sources/pyside2/tests/QtWidgets/qtreewidget_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.QtWidgets import QTreeWidget, QTreeWidgetItem, QPushButton from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qvariant_test.py b/sources/pyside2/tests/QtWidgets/qvariant_test.py index 8a9bf152f..d4da7d4b2 100644 --- a/sources/pyside2/tests/QtWidgets/qvariant_test.py +++ b/sources/pyside2/tests/QtWidgets/qvariant_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.QtWidgets import (QApplication, QComboBox, QGraphicsScene, QGraphicsRectItem) diff --git a/sources/pyside2/tests/QtWidgets/qwidget_setlayout_test.py b/sources/pyside2/tests/QtWidgets/qwidget_setlayout_test.py index f06ebb74f..4ac9e4e04 100644 --- a/sources/pyside2/tests/QtWidgets/qwidget_setlayout_test.py +++ b/sources/pyside2/tests/QtWidgets/qwidget_setlayout_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.QtWidgets import QWidget, QVBoxLayout, QPushButton, QApplication, QHBoxLayout from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/qwidget_test.py b/sources/pyside2/tests/QtWidgets/qwidget_test.py index ed6a0226e..74e97d7be 100644 --- a/sources/pyside2/tests/QtWidgets/qwidget_test.py +++ b/sources/pyside2/tests/QtWidgets/qwidget_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.QtWidgets import QWidget, QMainWindow from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/QtWidgets/reference_count_test.py b/sources/pyside2/tests/QtWidgets/reference_count_test.py index 7b5412353..a6ba302f9 100644 --- a/sources/pyside2/tests/QtWidgets/reference_count_test.py +++ b/sources/pyside2/tests/QtWidgets/reference_count_test.py @@ -34,7 +34,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 Qt, QPointF from PySide2.QtGui import QPolygonF diff --git a/sources/pyside2/tests/QtWidgets/signature_test.py b/sources/pyside2/tests/QtWidgets/signature_test.py index 3a0114b07..57fcf3874 100644 --- a/sources/pyside2/tests/QtWidgets/signature_test.py +++ b/sources/pyside2/tests/QtWidgets/signature_test.py @@ -39,7 +39,14 @@ from __future__ import print_function, absolute_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) + import PySide2.QtCore import PySide2.QtWidgets from shibokensupport.signature import inspect diff --git a/sources/pyside2/tests/QtWidgets/standardpixmap_test.py b/sources/pyside2/tests/QtWidgets/standardpixmap_test.py index c907c8209..12a5bea8e 100644 --- a/sources/pyside2/tests/QtWidgets/standardpixmap_test.py +++ b/sources/pyside2/tests/QtWidgets/standardpixmap_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.QtGui import QPixmap from PySide2.QtWidgets import QStyle diff --git a/sources/pyside2/tests/QtWidgets/test_module_template.py b/sources/pyside2/tests/QtWidgets/test_module_template.py index cc61fcf69..175004800 100644 --- a/sources/pyside2/tests/QtWidgets/test_module_template.py +++ b/sources/pyside2/tests/QtWidgets/test_module_template.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.QtWidgets import QWidget from PySide2.QtCore import QObject diff --git a/sources/pyside2/tests/QtWidgets/virtual_protected_inheritance_test.py b/sources/pyside2/tests/QtWidgets/virtual_protected_inheritance_test.py index 56580fc1e..4e6651cec 100644 --- a/sources/pyside2/tests/QtWidgets/virtual_protected_inheritance_test.py +++ b/sources/pyside2/tests/QtWidgets/virtual_protected_inheritance_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 QTimerEvent from PySide2.QtWidgets import QApplication, QSpinBox diff --git a/sources/pyside2/tests/QtWidgets/virtual_pure_override_test.py b/sources/pyside2/tests/QtWidgets/virtual_pure_override_test.py index 4ee56152e..78ad04043 100644 --- a/sources/pyside2/tests/QtWidgets/virtual_pure_override_test.py +++ b/sources/pyside2/tests/QtWidgets/virtual_pure_override_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.QtWidgets import QGraphicsScene, QGraphicsRectItem, QGraphicsView, QApplication from PySide2.QtGui import QBrush, QColor diff --git a/sources/pyside2/tests/QtWidgets/wrong_return_test.py b/sources/pyside2/tests/QtWidgets/wrong_return_test.py index 8fad3d627..d95ae7639 100644 --- a/sources/pyside2/tests/QtWidgets/wrong_return_test.py +++ b/sources/pyside2/tests/QtWidgets/wrong_return_test.py @@ -33,7 +33,9 @@ import sys import unittest import warnings -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 import QtWidgets diff --git a/sources/pyside2/tests/QtXml/qdomdocument_test.py b/sources/pyside2/tests/QtXml/qdomdocument_test.py index 3ff296503..67da9952c 100644 --- a/sources/pyside2/tests/QtXml/qdomdocument_test.py +++ b/sources/pyside2/tests/QtXml/qdomdocument_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 QByteArray from PySide2.QtXml import QDomDocument, QDomElement diff --git a/sources/pyside2/tests/QtXml/qxmlsimplereader_test.py b/sources/pyside2/tests/QtXml/qxmlsimplereader_test.py index 770495385..a30d68cde 100644 --- a/sources/pyside2/tests/QtXml/qxmlsimplereader_test.py +++ b/sources/pyside2/tests/QtXml/qxmlsimplereader_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.QtXml import QXmlSimpleReader class QXmlSimpleReaderTest(unittest.TestCase): diff --git a/sources/pyside2/tests/QtXmlPatterns/import_test.py b/sources/pyside2/tests/QtXmlPatterns/import_test.py index 0c6f74184..09032909f 100644 --- a/sources/pyside2/tests/QtXmlPatterns/import_test.py +++ b/sources/pyside2/tests/QtXmlPatterns/import_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 * from PySide2.QtXmlPatterns import QXmlSchema diff --git a/sources/pyside2/tests/init_paths.py b/sources/pyside2/tests/init_paths.py new file mode 100644 index 000000000..9cfdebc86 --- /dev/null +++ b/sources/pyside2/tests/init_paths.py @@ -0,0 +1,104 @@ +############################################################################# +## +## Copyright (C) 2020 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the test suite of Qt for Python. +## +## $QT_BEGIN_LICENSE:GPL-EXCEPT$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 as published by the Free Software +## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +from __future__ import print_function + +import os +import sys + +SRC_DIR = os.path.dirname(os.path.abspath(__file__)) +sys.path.append(os.path.join(os.path.dirname(os.path.dirname(SRC_DIR)), + 'shiboken2', 'tests')) +from shiboken_paths import (get_dir_env_var, get_build_dir, add_python_dirs, + add_lib_dirs, shiboken_paths) + + +def _get_qt_dir(): + """Retrieve the location of Qt.""" + result = None + try: + result = get_dir_env_var('QT_DIR') + except Exception: + # This is just a convenience for command line invocation independent + # of ctest. Normally, QT_DIR should be set to avoid repetitive patch + # searches. + print('The environment variable QT_DIR is not set; falling back to path search', + file=sys.stderr) + qmake = 'qmake.exe' if sys.platform == 'win32' else 'qmake' + for path in os.environ.get('PATH').split(os.pathsep): + if path and os.path.isfile(os.path.join(path, qmake)): + result = os.path.dirname(path) + break + if not result: + raise ValueError('Unable to locate Qt. Please set the environment variable QT_DIR') + print('Qt as determined by path search: {}'.format(result), file=sys.stderr) + return result + + +def _get_qt_lib_dir(): + """Retrieve the location of the Qt library directory.""" + sub_dir = 'bin' if sys.platform == 'win32' else 'lib' + return os.path.join(_get_qt_dir(), sub_dir) # For testbinding + + +def _init_test_paths(shiboken_tests=False, testbindings_module=False): + """Sets the correct import paths (Python modules and C++ library paths) + for PySide tests and shiboken2 tests using depending on the environment + variables BUILD_DIR and QT_DIR pointing to the build directory and + Qt directory, respectively.""" + src_dir = os.path.dirname(os.path.abspath(__file__)) + + python_dirs = [os.path.join(src_dir, 'util')] # Helper module + + pyside_build_dir = os.path.join(get_build_dir(), 'pyside2') + python_dirs.append(pyside_build_dir) # for PySide2 + lib_dirs = [os.path.join(pyside_build_dir, 'libpyside')] + + if testbindings_module: + python_dirs.append(os.path.join(pyside_build_dir, + 'tests', 'pysidetest')) + lib_dirs.append(_get_qt_lib_dir()) + + shiboken_path_tuple = shiboken_paths(shiboken_tests) + python_dirs.extend(shiboken_path_tuple[0]) + lib_dirs.extend(shiboken_path_tuple[1]) + + add_python_dirs(python_dirs) + add_lib_dirs(lib_dirs) + + +def init_test_paths(testbindings_module=False): + """Sets the correct import paths for PySide2 tests, optionally including + testbindings.""" + _init_test_paths(False, testbindings_module) + + +def init_all_test_paths(): + """Sets the correct import paths for PySide2 and shiboken2 tests + (for registry checking only).""" + _init_test_paths(True, True) diff --git a/sources/pyside2/tests/mac/qmacstyle_test.py b/sources/pyside2/tests/mac/qmacstyle_test.py index 4a65a144d..091f9591b 100644 --- a/sources/pyside2/tests/mac/qmacstyle_test.py +++ b/sources/pyside2/tests/mac/qmacstyle_test.py @@ -27,14 +27,17 @@ ############################################################################# # Qt5: this is gone: from PySide2.QtGui import QMacStyle -from PySide2.QtWidgets import QApplication, QLabel, QStyleFactory -from PySide2.QtCore import QObject 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.QtWidgets import QApplication, QLabel, QStyleFactory +from PySide2.QtCore import QObject from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/pysidetest/all_modules_load_test.py b/sources/pyside2/tests/pysidetest/all_modules_load_test.py index e802685fb..10ccc5221 100644 --- a/sources/pyside2/tests/pysidetest/all_modules_load_test.py +++ b/sources/pyside2/tests/pysidetest/all_modules_load_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 # Note: diff --git a/sources/pyside2/tests/pysidetest/bug_1016.py b/sources/pyside2/tests/pysidetest/bug_1016.py index c2b709333..9f035e0e1 100644 --- a/sources/pyside2/tests/pysidetest/bug_1016.py +++ b/sources/pyside2/tests/pysidetest/bug_1016.py @@ -26,9 +26,17 @@ ## ############################################################################# -from testbinding 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(True) + +import shiboken2 +from testbinding import * + class TestBug1016 (unittest.TestCase): def testIt(self): diff --git a/sources/pyside2/tests/pysidetest/constructor_properties_test.py b/sources/pyside2/tests/pysidetest/constructor_properties_test.py index e84a4546e..139091fed 100644 --- a/sources/pyside2/tests/pysidetest/constructor_properties_test.py +++ b/sources/pyside2/tests/pysidetest/constructor_properties_test.py @@ -41,7 +41,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.usesqapplication import UsesQApplication from PySide2.QtCore import Qt diff --git a/sources/pyside2/tests/pysidetest/decoratedslot_test.py b/sources/pyside2/tests/pysidetest/decoratedslot_test.py index 47878ed8c..3825f48ab 100644 --- a/sources/pyside2/tests/pysidetest/decoratedslot_test.py +++ b/sources/pyside2/tests/pysidetest/decoratedslot_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(True) + from PySide2.QtCore import QObject from testbinding import TestObject diff --git a/sources/pyside2/tests/pysidetest/delegatecreateseditor_test.py b/sources/pyside2/tests/pysidetest/delegatecreateseditor_test.py index 82967a177..1378ca8ad 100644 --- a/sources/pyside2/tests/pysidetest/delegatecreateseditor_test.py +++ b/sources/pyside2/tests/pysidetest/delegatecreateseditor_test.py @@ -28,9 +28,15 @@ ## ############################################################################# +import os +import sys import unittest -from helper.usesqapplication import UsesQApplication +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_test_paths +init_test_paths(True) + +from helper.usesqapplication import UsesQApplication from testbinding import TestView from PySide2.QtCore import Qt from PySide2.QtWidgets import QAbstractItemDelegate, QComboBox diff --git a/sources/pyside2/tests/pysidetest/embedding_test.py b/sources/pyside2/tests/pysidetest/embedding_test.py index aa71360ca..1960838ff 100644 --- a/sources/pyside2/tests/pysidetest/embedding_test.py +++ b/sources/pyside2/tests/pysidetest/embedding_test.py @@ -37,8 +37,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) + # This test tests the embedding feature of PySide. # Normally, embedding is only used when necessary. # By setting the variable "pyside_uses_embedding", diff --git a/sources/pyside2/tests/pysidetest/enum_test.py b/sources/pyside2/tests/pysidetest/enum_test.py index 428e087f0..d179d6248 100644 --- a/sources/pyside2/tests/pysidetest/enum_test.py +++ b/sources/pyside2/tests/pysidetest/enum_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(True) + from testbinding import Enum1, TestObjectWithoutNamespace class ListConnectionTest(unittest.TestCase): diff --git a/sources/pyside2/tests/pysidetest/homonymoussignalandmethod_test.py b/sources/pyside2/tests/pysidetest/homonymoussignalandmethod_test.py index 906d0ddb7..1566b4a82 100644 --- a/sources/pyside2/tests/pysidetest/homonymoussignalandmethod_test.py +++ b/sources/pyside2/tests/pysidetest/homonymoussignalandmethod_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(True) + from testbinding import TestObject '''Tests the behaviour of homonymous signals and slots.''' diff --git a/sources/pyside2/tests/pysidetest/iterable_test.py b/sources/pyside2/tests/pysidetest/iterable_test.py index 2f488875e..c5685112d 100644 --- a/sources/pyside2/tests/pysidetest/iterable_test.py +++ b/sources/pyside2/tests/pysidetest/iterable_test.py @@ -35,6 +35,11 @@ This test checks that the Iterable protocol is implemented correctly. 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 import QtCore, QtGui diff --git a/sources/pyside2/tests/pysidetest/list_signal_test.py b/sources/pyside2/tests/pysidetest/list_signal_test.py index a438f0c89..d66ba7905 100644 --- a/sources/pyside2/tests/pysidetest/list_signal_test.py +++ b/sources/pyside2/tests/pysidetest/list_signal_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(True) + from testbinding import TestObject from PySide2.QtCore import QObject diff --git a/sources/pyside2/tests/pysidetest/mixin_signal_slots_test.py b/sources/pyside2/tests/pysidetest/mixin_signal_slots_test.py index 44bb33be6..d0b40cfa0 100644 --- a/sources/pyside2/tests/pysidetest/mixin_signal_slots_test.py +++ b/sources/pyside2/tests/pysidetest/mixin_signal_slots_test.py @@ -33,7 +33,14 @@ are registered at type parsing time. Also test that the signal and slot indices do not change after signal connection or emission. ''' +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 Mixin(object): diff --git a/sources/pyside2/tests/pysidetest/modelview_test.py b/sources/pyside2/tests/pysidetest/modelview_test.py index a0f723c4a..a4ae9dd40 100644 --- a/sources/pyside2/tests/pysidetest/modelview_test.py +++ b/sources/pyside2/tests/pysidetest/modelview_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(True) + import py3kcompat as py3k from testbinding import TestView from PySide2.QtCore import QAbstractListModel, QObject, QModelIndex diff --git a/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py b/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py index 09e5f2610..81a764986 100644 --- a/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py +++ b/sources/pyside2/tests/pysidetest/new_inherited_functions_test.py @@ -28,10 +28,14 @@ from __future__ import print_function -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 import * for modname, mod in sys.modules.items(): # Python 2 leaves "None" in the dict. diff --git a/sources/pyside2/tests/pysidetest/notify_id.py b/sources/pyside2/tests/pysidetest/notify_id.py index d96e8d91f..393736a65 100644 --- a/sources/pyside2/tests/pysidetest/notify_id.py +++ b/sources/pyside2/tests/pysidetest/notify_id.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 QObject, Signal, Property, Slot '''Tests that the signal notify id of a property is correct, aka corresponds to the initially set diff --git a/sources/pyside2/tests/pysidetest/qapp_like_a_macro_test.py b/sources/pyside2/tests/pysidetest/qapp_like_a_macro_test.py index 2cc18c9c9..bfcf40111 100644 --- a/sources/pyside2/tests/pysidetest/qapp_like_a_macro_test.py +++ b/sources/pyside2/tests/pysidetest/qapp_like_a_macro_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 # This test tests the new "macro" feature of qApp. diff --git a/sources/pyside2/tests/pysidetest/qvariant_test.py b/sources/pyside2/tests/pysidetest/qvariant_test.py index 8f8b8b968..0efece889 100644 --- a/sources/pyside2/tests/pysidetest/qvariant_test.py +++ b/sources/pyside2/tests/pysidetest/qvariant_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(True) + from testbinding import TestObject from PySide2.QtCore import Qt from PySide2.QtGui import QKeySequence diff --git a/sources/pyside2/tests/pysidetest/repr_test.py b/sources/pyside2/tests/pysidetest/repr_test.py index 295084f17..356d11911 100644 --- a/sources/pyside2/tests/pysidetest/repr_test.py +++ b/sources/pyside2/tests/pysidetest/repr_test.py @@ -40,7 +40,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(True) + from testbinding import PySideCPP, TestObject class QObjectDerivedReprTest(unittest.TestCase): diff --git a/sources/pyside2/tests/pysidetest/signal_slot_warning.py b/sources/pyside2/tests/pysidetest/signal_slot_warning.py index 84ddc23de..a54974c3b 100644 --- a/sources/pyside2/tests/pysidetest/signal_slot_warning.py +++ b/sources/pyside2/tests/pysidetest/signal_slot_warning.py @@ -33,11 +33,17 @@ from __future__ import print_function -import unittest -import PySide2.QtCore as QtCore +import os import sys +import unittest import warnings +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 Whatever(QtCore.QObject): echoSignal = QtCore.Signal(str) diff --git a/sources/pyside2/tests/pysidetest/signalandnamespace_test.py b/sources/pyside2/tests/pysidetest/signalandnamespace_test.py index 9bb42ea40..f56beaf84 100644 --- a/sources/pyside2/tests/pysidetest/signalandnamespace_test.py +++ b/sources/pyside2/tests/pysidetest/signalandnamespace_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(True) + from testbinding import PySideCPP, TestObjectWithoutNamespace class ModelViewTest(unittest.TestCase): diff --git a/sources/pyside2/tests/pysidetest/signalemissionfrompython_test.py b/sources/pyside2/tests/pysidetest/signalemissionfrompython_test.py index 43b31f5c0..ed7302c69 100644 --- a/sources/pyside2/tests/pysidetest/signalemissionfrompython_test.py +++ b/sources/pyside2/tests/pysidetest/signalemissionfrompython_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(True) + from testbinding import TestObject from PySide2.QtCore import QObject, SIGNAL diff --git a/sources/pyside2/tests/pysidetest/signalwithdefaultvalue_test.py b/sources/pyside2/tests/pysidetest/signalwithdefaultvalue_test.py index 11951fb09..fc13fc0d9 100644 --- a/sources/pyside2/tests/pysidetest/signalwithdefaultvalue_test.py +++ b/sources/pyside2/tests/pysidetest/signalwithdefaultvalue_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(True) + from testbinding import TestObject from PySide2.QtCore import QObject, SIGNAL diff --git a/sources/pyside2/tests/pysidetest/typedef_signal_test.py b/sources/pyside2/tests/pysidetest/typedef_signal_test.py index f7724b618..ecbfa35d4 100644 --- a/sources/pyside2/tests/pysidetest/typedef_signal_test.py +++ b/sources/pyside2/tests/pysidetest/typedef_signal_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(True) + from PySide2.QtCore import QObject from testbinding import TestObject diff --git a/sources/pyside2/tests/pysidetest/version_test.py b/sources/pyside2/tests/pysidetest/version_test.py index 447fafdeb..5cc34d8c3 100644 --- a/sources/pyside2/tests/pysidetest/version_test.py +++ b/sources/pyside2/tests/pysidetest/version_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 import __version_info__, __version__, QtCore class CheckForVariablesTest(unittest.TestCase): diff --git a/sources/pyside2/tests/registry/existence_test.py b/sources/pyside2/tests/registry/existence_test.py index 6db88a818..4bfd63cc3 100644 --- a/sources/pyside2/tests/registry/existence_test.py +++ b/sources/pyside2/tests/registry/existence_test.py @@ -68,8 +68,13 @@ List entry import os import sys -import unittest from textwrap import dedent +import unittest + +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from init_paths import init_all_test_paths +init_all_test_paths() + from init_platform import enum_all, generate_all from util import (isolate_warnings, check_warnings, suppress_warnings, warn, is_ci, qt_version, get_script_dir, get_effective_refpath, diff --git a/sources/pyside2/tests/signals/args_dont_match_test.py b/sources/pyside2/tests/signals/args_dont_match_test.py index f50611ad6..732706ac0 100644 --- a/sources/pyside2/tests/signals/args_dont_match_test.py +++ b/sources/pyside2/tests/signals/args_dont_match_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 ArgsDontMatch(unittest.TestCase): diff --git a/sources/pyside2/tests/signals/bug_189.py b/sources/pyside2/tests/signals/bug_189.py index a23658422..6492f0359 100644 --- a/sources/pyside2/tests/signals/bug_189.py +++ b/sources/pyside2/tests/signals/bug_189.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 import QtCore, QtWidgets from helper.usesqapplication import UsesQApplication diff --git a/sources/pyside2/tests/signals/bug_311.py b/sources/pyside2/tests/signals/bug_311.py index 36e022a55..c9782741d 100644 --- a/sources/pyside2/tests/signals/bug_311.py +++ b/sources/pyside2/tests/signals/bug_311.py @@ -33,7 +33,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 import QtCore from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/signals/bug_312.py b/sources/pyside2/tests/signals/bug_312.py index 08019654c..1b6eabe7e 100644 --- a/sources/pyside2/tests/signals/bug_312.py +++ b/sources/pyside2/tests/signals/bug_312.py @@ -29,8 +29,14 @@ ## ############################################################################# -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, SIGNAL MAX_LOOPS = 5 diff --git a/sources/pyside2/tests/signals/bug_319.py b/sources/pyside2/tests/signals/bug_319.py index f42add3cf..17cd8abcf 100644 --- a/sources/pyside2/tests/signals/bug_319.py +++ b/sources/pyside2/tests/signals/bug_319.py @@ -33,7 +33,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 import QtCore from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/signals/bug_79.py b/sources/pyside2/tests/signals/bug_79.py index 4a595912c..ca25fb3f4 100644 --- a/sources/pyside2/tests/signals/bug_79.py +++ b/sources/pyside2/tests/signals/bug_79.py @@ -27,9 +27,14 @@ ############################################################################# from __future__ import print_function -import unittest -import sys +import os import gc +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 QtGui, QtWidgets diff --git a/sources/pyside2/tests/signals/decorators_test.py b/sources/pyside2/tests/signals/decorators_test.py index e5a8be461..e262f0bce 100644 --- a/sources/pyside2/tests/signals/decorators_test.py +++ b/sources/pyside2/tests/signals/decorators_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.QtCore import QObject, Slot, SIGNAL, SLOT class MyObject(QObject): diff --git a/sources/pyside2/tests/signals/disconnect_test.py b/sources/pyside2/tests/signals/disconnect_test.py index 79c33ed7a..6242e9e38 100644 --- a/sources/pyside2/tests/signals/disconnect_test.py +++ b/sources/pyside2/tests/signals/disconnect_test.py @@ -26,10 +26,14 @@ ## ############################################################################# -import os, sys -sys.path.insert(0, os.path.join("..", "pysidetest")) - +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(True) + from PySide2.QtCore import * from testbinding import TestObject diff --git a/sources/pyside2/tests/signals/invalid_callback_test.py b/sources/pyside2/tests/signals/invalid_callback_test.py index b3b301d67..442720baa 100644 --- a/sources/pyside2/tests/signals/invalid_callback_test.py +++ b/sources/pyside2/tests/signals/invalid_callback_test.py @@ -28,8 +28,14 @@ '''Test cases for passing invalid callbacks to QObject.connect''' +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 InvalidCallback(unittest.TestCase): diff --git a/sources/pyside2/tests/signals/lambda_gui_test.py b/sources/pyside2/tests/signals/lambda_gui_test.py index 4f33addab..843b4037f 100644 --- a/sources/pyside2/tests/signals/lambda_gui_test.py +++ b/sources/pyside2/tests/signals/lambda_gui_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 diff --git a/sources/pyside2/tests/signals/lambda_test.py b/sources/pyside2/tests/signals/lambda_test.py index 2a3f0139a..f01096150 100644 --- a/sources/pyside2/tests/signals/lambda_test.py +++ b/sources/pyside2/tests/signals/lambda_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, SIGNAL, QProcess diff --git a/sources/pyside2/tests/signals/leaking_signal_test.py b/sources/pyside2/tests/signals/leaking_signal_test.py index f8ac041ba..705d16075 100644 --- a/sources/pyside2/tests/signals/leaking_signal_test.py +++ b/sources/pyside2/tests/signals/leaking_signal_test.py @@ -26,10 +26,18 @@ ## ############################################################################# +import os +import sys import unittest -from PySide2 import QtCore 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 import QtCore + + class LeakingSignal(unittest.TestCase): def testLeakingSignal(self): diff --git a/sources/pyside2/tests/signals/multiple_connections_gui_test.py b/sources/pyside2/tests/signals/multiple_connections_gui_test.py index d4104b5ce..4429c49f4 100644 --- a/sources/pyside2/tests/signals/multiple_connections_gui_test.py +++ b/sources/pyside2/tests/signals/multiple_connections_gui_test.py @@ -32,7 +32,9 @@ import random 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 diff --git a/sources/pyside2/tests/signals/multiple_connections_test.py b/sources/pyside2/tests/signals/multiple_connections_test.py index 8172596b1..a8f5bcd9d 100644 --- a/sources/pyside2/tests/signals/multiple_connections_test.py +++ b/sources/pyside2/tests/signals/multiple_connections_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 QObject, SIGNAL, QProcess diff --git a/sources/pyside2/tests/signals/pysignal_test.py b/sources/pyside2/tests/signals/pysignal_test.py index bdb62b5bf..5561671c4 100644 --- a/sources/pyside2/tests/signals/pysignal_test.py +++ b/sources/pyside2/tests/signals/pysignal_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 QObject, SIGNAL, SLOT, Qt diff --git a/sources/pyside2/tests/signals/qobject_destroyed_test.py b/sources/pyside2/tests/signals/qobject_destroyed_test.py index 87e78c22c..35752a6ca 100644 --- a/sources/pyside2/tests/signals/qobject_destroyed_test.py +++ b/sources/pyside2/tests/signals/qobject_destroyed_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, SIGNAL class QObjectDestroyed(unittest.TestCase): diff --git a/sources/pyside2/tests/signals/qobject_receivers_test.py b/sources/pyside2/tests/signals/qobject_receivers_test.py index 629fda5cf..8ad89fe78 100644 --- a/sources/pyside2/tests/signals/qobject_receivers_test.py +++ b/sources/pyside2/tests/signals/qobject_receivers_test.py @@ -30,7 +30,14 @@ ''' Test case for QObject.receivers()''' +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 * def cute_slot(): diff --git a/sources/pyside2/tests/signals/qobject_sender_test.py b/sources/pyside2/tests/signals/qobject_sender_test.py index 108054518..ce11b803a 100644 --- a/sources/pyside2/tests/signals/qobject_sender_test.py +++ b/sources/pyside2/tests/signals/qobject_sender_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 * from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/signals/ref01_test.py b/sources/pyside2/tests/signals/ref01_test.py index e12dfc910..d2c658568 100644 --- a/sources/pyside2/tests/signals/ref01_test.py +++ b/sources/pyside2/tests/signals/ref01_test.py @@ -29,7 +29,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 BoundAndUnboundSignalsTest(unittest.TestCase): diff --git a/sources/pyside2/tests/signals/ref02_test.py b/sources/pyside2/tests/signals/ref02_test.py index e7659246d..9a31b4b52 100644 --- a/sources/pyside2/tests/signals/ref02_test.py +++ b/sources/pyside2/tests/signals/ref02_test.py @@ -33,7 +33,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 QCoreApplication, QTimeLine from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/signals/ref03_test.py b/sources/pyside2/tests/signals/ref03_test.py index da24da659..25f404f38 100644 --- a/sources/pyside2/tests/signals/ref03_test.py +++ b/sources/pyside2/tests/signals/ref03_test.py @@ -29,8 +29,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 QObject class DisconnectSignalsTest(unittest.TestCase): diff --git a/sources/pyside2/tests/signals/ref04_test.py b/sources/pyside2/tests/signals/ref04_test.py index 033449cc7..4c66c04ef 100644 --- a/sources/pyside2/tests/signals/ref04_test.py +++ b/sources/pyside2/tests/signals/ref04_test.py @@ -29,7 +29,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 ExtQObject(QObject): diff --git a/sources/pyside2/tests/signals/ref05_test.py b/sources/pyside2/tests/signals/ref05_test.py index 848bf89d6..3b7bf1983 100644 --- a/sources/pyside2/tests/signals/ref05_test.py +++ b/sources/pyside2/tests/signals/ref05_test.py @@ -33,7 +33,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, QTimeLine, Slot from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/signals/ref06_test.py b/sources/pyside2/tests/signals/ref06_test.py index adba267b4..51d78e638 100644 --- a/sources/pyside2/tests/signals/ref06_test.py +++ b/sources/pyside2/tests/signals/ref06_test.py @@ -33,7 +33,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, QTimeLine, Signal, Slot from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/signals/segfault_proxyparent_test.py b/sources/pyside2/tests/signals/segfault_proxyparent_test.py index 758c7888f..2d45f1e7f 100644 --- a/sources/pyside2/tests/signals/segfault_proxyparent_test.py +++ b/sources/pyside2/tests/signals/segfault_proxyparent_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, SIGNAL # Description of the problem diff --git a/sources/pyside2/tests/signals/self_connect_test.py b/sources/pyside2/tests/signals/self_connect_test.py index 61280474a..cca97b096 100644 --- a/sources/pyside2/tests/signals/self_connect_test.py +++ b/sources/pyside2/tests/signals/self_connect_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, SIGNAL, SLOT from PySide2.QtWidgets import QPushButton, QWidget diff --git a/sources/pyside2/tests/signals/short_circuit_test.py b/sources/pyside2/tests/signals/short_circuit_test.py index e181b6497..61acc77c0 100644 --- a/sources/pyside2/tests/signals/short_circuit_test.py +++ b/sources/pyside2/tests/signals/short_circuit_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, SIGNAL, SLOT class Dummy(QObject): diff --git a/sources/pyside2/tests/signals/signal2signal_connect_test.py b/sources/pyside2/tests/signals/signal2signal_connect_test.py index 4619a8694..c5008c942 100644 --- a/sources/pyside2/tests/signals/signal2signal_connect_test.py +++ b/sources/pyside2/tests/signals/signal2signal_connect_test.py @@ -30,7 +30,14 @@ ''' Test case for signal to signal connections.''' +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 * def cute_slot(): diff --git a/sources/pyside2/tests/signals/signal_autoconnect_test.py b/sources/pyside2/tests/signals/signal_autoconnect_test.py index 9fe8f94d3..b19f28ab7 100644 --- a/sources/pyside2/tests/signals/signal_autoconnect_test.py +++ b/sources/pyside2/tests/signals/signal_autoconnect_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.QtCore import * from PySide2.QtWidgets import * diff --git a/sources/pyside2/tests/signals/signal_connectiontype_support_test.py b/sources/pyside2/tests/signals/signal_connectiontype_support_test.py index d8dee9454..00865a95e 100644 --- a/sources/pyside2/tests/signals/signal_connectiontype_support_test.py +++ b/sources/pyside2/tests/signals/signal_connectiontype_support_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, SIGNAL, Qt class Dummy(QObject): diff --git a/sources/pyside2/tests/signals/signal_emission_gui_test.py b/sources/pyside2/tests/signals/signal_emission_gui_test.py index 4b36336fb..d46e78c5e 100644 --- a/sources/pyside2/tests/signals/signal_emission_gui_test.py +++ b/sources/pyside2/tests/signals/signal_emission_gui_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, SIGNAL, SLOT diff --git a/sources/pyside2/tests/signals/signal_emission_test.py b/sources/pyside2/tests/signals/signal_emission_test.py index e45902abd..f9c221e8f 100644 --- a/sources/pyside2/tests/signals/signal_emission_test.py +++ b/sources/pyside2/tests/signals/signal_emission_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 QObject, SIGNAL, SLOT, QProcess, QTimeLine diff --git a/sources/pyside2/tests/signals/signal_func_test.py b/sources/pyside2/tests/signals/signal_func_test.py index 37bb191fe..0026bc726 100644 --- a/sources/pyside2/tests/signals/signal_func_test.py +++ b/sources/pyside2/tests/signals/signal_func_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.QtCore import SIGNAL, SLOT class SIGNALSLOTTests(unittest.TestCase): diff --git a/sources/pyside2/tests/signals/signal_manager_refcount_test.py b/sources/pyside2/tests/signals/signal_manager_refcount_test.py index ece9a3ce0..6942f983d 100644 --- a/sources/pyside2/tests/signals/signal_manager_refcount_test.py +++ b/sources/pyside2/tests/signals/signal_manager_refcount_test.py @@ -28,8 +28,16 @@ ## ############################################################################# + +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 QObject, SIGNAL class SignalManagerRefCount(unittest.TestCase): diff --git a/sources/pyside2/tests/signals/signal_number_limit_test.py b/sources/pyside2/tests/signals/signal_number_limit_test.py index ba1edac25..67bb63e44 100644 --- a/sources/pyside2/tests/signals/signal_number_limit_test.py +++ b/sources/pyside2/tests/signals/signal_number_limit_test.py @@ -29,7 +29,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 Emitter(QtCore.QObject): diff --git a/sources/pyside2/tests/signals/signal_object_test.py b/sources/pyside2/tests/signals/signal_object_test.py index 76b859a4f..bf4abedbc 100644 --- a/sources/pyside2/tests/signals/signal_object_test.py +++ b/sources/pyside2/tests/signals/signal_object_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 QTimer, Signal, QObject, Slot, Qt from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/signals/signal_signature_test.py b/sources/pyside2/tests/signals/signal_signature_test.py index da19862fe..1f661de0a 100644 --- a/sources/pyside2/tests/signals/signal_signature_test.py +++ b/sources/pyside2/tests/signals/signal_signature_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/signals/signal_with_primitive_type_test.py b/sources/pyside2/tests/signals/signal_with_primitive_type_test.py index cc3f084d0..f7f691f34 100644 --- a/sources/pyside2/tests/signals/signal_with_primitive_type_test.py +++ b/sources/pyside2/tests/signals/signal_with_primitive_type_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/signals/slot_reference_count_test.py b/sources/pyside2/tests/signals/slot_reference_count_test.py index e6bcda0e8..7885a358b 100644 --- a/sources/pyside2/tests/signals/slot_reference_count_test.py +++ b/sources/pyside2/tests/signals/slot_reference_count_test.py @@ -28,8 +28,14 @@ ''' Forced disconnection: Delete one end of the signal connection''' -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 QObject, SIGNAL, SLOT diff --git a/sources/pyside2/tests/signals/static_metaobject_test.py b/sources/pyside2/tests/signals/static_metaobject_test.py index a6cca5ca4..bdb3b1992 100644 --- a/sources/pyside2/tests/signals/static_metaobject_test.py +++ b/sources/pyside2/tests/signals/static_metaobject_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, SIGNAL, Slot from helper.usesqcoreapplication import UsesQCoreApplication diff --git a/sources/pyside2/tests/support/voidptr_test.py b/sources/pyside2/tests/support/voidptr_test.py index f68217244..9e3668eb1 100644 --- a/sources/pyside2/tests/support/voidptr_test.py +++ b/sources/pyside2/tests/support/voidptr_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 shiboken2 as shiboken from PySide2.support import VoidPtr from PySide2.QtCore import QByteArray -- cgit v1.2.3