aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-03-04 08:27:14 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-03-04 08:27:14 +0100
commit98d9a82d4a94b91012c9e9cbc7f7c57ddacceac9 (patch)
tree10920682a82713a4579a94e51f54755707af805a
parent7ef372b13fb6393b76029b9b62ebcb4166fa5f70 (diff)
parentcc19c439a64ddc42bc333ee5df7b651a789d6da5 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
-rw-r--r--sources/pyside2/PySide2/QtQuick/typesystem_quick.xml2
-rw-r--r--sources/pyside2/doc/considerations.rst52
-rw-r--r--sources/pyside2/tests/CMakeLists.txt24
-rw-r--r--sources/pyside2/tests/Qt3DExtras/qt3dextras_test.py4
-rw-r--r--sources/pyside2/tests/QtCharts/qcharts_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/attr_cache_py3k.py8
-rw-r--r--sources/pyside2/tests/QtCore/blocking_signals_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/bug_1019.py7
-rw-r--r--sources/pyside2/tests/QtCore/bug_1031.py8
-rw-r--r--sources/pyside2/tests/QtCore/bug_1063.py4
-rw-r--r--sources/pyside2/tests/QtCore/bug_1069.py10
-rw-r--r--sources/pyside2/tests/QtCore/bug_278_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_332.py7
-rw-r--r--sources/pyside2/tests/QtCore/bug_408.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_428.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_462.py7
-rw-r--r--sources/pyside2/tests/QtCore/bug_505.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_515.py8
-rw-r--r--sources/pyside2/tests/QtCore/bug_606.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_656.py8
-rw-r--r--sources/pyside2/tests/QtCore/bug_686.py7
-rw-r--r--sources/pyside2/tests/QtCore/bug_699.py7
-rw-r--r--sources/pyside2/tests/QtCore/bug_706.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_820.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_826.py9
-rw-r--r--sources/pyside2/tests/QtCore/bug_829.py9
-rw-r--r--sources/pyside2/tests/QtCore/bug_835.py9
-rw-r--r--sources/pyside2/tests/QtCore/bug_920.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_927.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_931.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_938.py4
-rw-r--r--sources/pyside2/tests/QtCore/bug_953.py8
-rw-r--r--sources/pyside2/tests/QtCore/bug_987.py10
-rw-r--r--sources/pyside2/tests/QtCore/bug_994.py4
-rw-r--r--sources/pyside2/tests/QtCore/bug_PYSIDE-164.py6
-rw-r--r--sources/pyside2/tests/QtCore/bug_PYSIDE-42.py10
-rw-r--r--sources/pyside2/tests/QtCore/child_event_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/classinfo_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/deepcopy_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/deletelater_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/destroysignal_test.py9
-rw-r--r--sources/pyside2/tests/QtCore/duck_punching_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/emoji_string_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/hash_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/inherits_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/max_signals.py6
-rw-r--r--sources/pyside2/tests/QtCore/missing_symbols_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/mockclass_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/python_conversion.py7
-rw-r--r--sources/pyside2/tests/QtCore/qabs_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qabstractitemmodel_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qabstracttransition_test.py9
-rw-r--r--sources/pyside2/tests/QtCore/qanimationgroup_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qbitarray_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_buffer_protocol_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_concatenation_operator_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_operator_iadd_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_operator_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qbytearray_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qcalendar_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qcbor_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qcollator_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qcommandlineparser_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qcoreapplication_instance_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qcoreapplication_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qdatastream_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qdate_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qdatetime_test.py8
-rw-r--r--sources/pyside2/tests/QtCore/qeasingcurve_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qenum_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qevent_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qfile_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qfileinfo_test.py8
-rw-r--r--sources/pyside2/tests/QtCore/qfileread_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qflags_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qhandle_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qinstallmsghandler_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qjsondocument_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qlinef_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qlocale_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qlockfile_test.py9
-rw-r--r--sources/pyside2/tests/QtCore/qmessageauthenticationcode_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qmetaobject_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qmimedatabase_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qmodelindex_internalpointer_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qobject_children_segfault_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qobject_connect_notify_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qobject_destructor.py6
-rw-r--r--sources/pyside2/tests/QtCore/qobject_event_filter_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qobject_inherits_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qobject_objectproperty_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qobject_parent_test.py8
-rw-r--r--sources/pyside2/tests/QtCore/qobject_property_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qobject_protected_methods_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qobject_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qobject_timer_event_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qobject_tr_as_instance_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qoperatingsystemversion_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qpoint_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qprocess_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qproperty_decorator.py8
-rw-r--r--sources/pyside2/tests/QtCore/qrandomgenerator_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qrect_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qregexp_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qregularexpression_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qresource_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qsettings_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qsize_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qslot_object_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qsocketnotifier_test.py11
-rw-r--r--sources/pyside2/tests/QtCore/qsrand_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qstandardpaths_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qstate_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qstatemachine_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qstorageinfo_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qstring_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qsysinfo_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/qtext_codec_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qtextstream_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qthread_prod_cons_test.py10
-rw-r--r--sources/pyside2/tests/QtCore/qthread_signal_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qthread_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qtimer_singleshot_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qtimer_timeout_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qtimezone_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/qtnamespace_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qurl_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qurlquery_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/quuid_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/qversionnumber_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/repr_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/setprop_on_ctor_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/staticMetaObject_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/static_method_test.py5
-rw-r--r--sources/pyside2/tests/QtCore/thread_signals_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/tr_noop_test.py7
-rw-r--r--sources/pyside2/tests/QtCore/translation_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/unaryoperator_test.py6
-rw-r--r--sources/pyside2/tests/QtCore/unicode_test.py4
-rw-r--r--sources/pyside2/tests/QtCore/versioninfo_test.py7
-rw-r--r--sources/pyside2/tests/QtDataVisualization/datavisualization_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/bug_1091.py7
-rw-r--r--sources/pyside2/tests/QtGui/bug_300_test.py10
-rw-r--r--sources/pyside2/tests/QtGui/bug_367.py4
-rw-r--r--sources/pyside2/tests/QtGui/bug_480.py6
-rw-r--r--sources/pyside2/tests/QtGui/bug_606.py6
-rw-r--r--sources/pyside2/tests/QtGui/bug_617.py10
-rw-r--r--sources/pyside2/tests/QtGui/bug_652.py9
-rw-r--r--sources/pyside2/tests/QtGui/bug_660.py4
-rw-r--r--sources/pyside2/tests/QtGui/bug_716.py8
-rw-r--r--sources/pyside2/tests/QtGui/bug_740.py4
-rw-r--r--sources/pyside2/tests/QtGui/bug_743.py6
-rw-r--r--sources/pyside2/tests/QtGui/bug_991.py7
-rw-r--r--sources/pyside2/tests/QtGui/bug_PYSIDE-344.py6
-rw-r--r--sources/pyside2/tests/QtGui/bug_PYSIDE-41.py6
-rw-r--r--sources/pyside2/tests/QtGui/deepcopy_test.py8
-rw-r--r--sources/pyside2/tests/QtGui/float_to_int_implicit_conversion_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/pyside_reload_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qcolor_reduce_test.py9
-rw-r--r--sources/pyside2/tests/QtGui/qcolor_test.py10
-rw-r--r--sources/pyside2/tests/QtGui/qcursor_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qdatastream_gui_operators_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qdesktopservices_test.py6
-rw-r--r--sources/pyside2/tests/QtGui/qfontmetrics_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qguiapplication_test.py6
-rw-r--r--sources/pyside2/tests/QtGui/qicon_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qitemselection_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qkeysequence_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qmatrix_test.py6
-rw-r--r--sources/pyside2/tests/QtGui/qopenglbuffer_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qopenglwindow_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qpainter_test.py6
-rw-r--r--sources/pyside2/tests/QtGui/qpdfwriter_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qpixelformat_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qpixmap_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qpixmapcache_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qpolygonf_test.py7
-rw-r--r--sources/pyside2/tests/QtGui/qradialgradient_test.py6
-rw-r--r--sources/pyside2/tests/QtGui/qrasterwindow_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qregion_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qstylehints_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qtextdocument_functions.py6
-rw-r--r--sources/pyside2/tests/QtGui/qtextdocument_undoredo_test.py6
-rw-r--r--sources/pyside2/tests/QtGui/qtextdocumentwriter_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qtextline_test.py4
-rw-r--r--sources/pyside2/tests/QtGui/qtransform_test.py7
-rw-r--r--sources/pyside2/tests/QtGui/repr_test.py6
-rw-r--r--sources/pyside2/tests/QtGui/timed_app_and_patching_test.py4
-rw-r--r--sources/pyside2/tests/QtHelp/help_test.py4
-rw-r--r--sources/pyside2/tests/QtHelp/helpsearchengine_test.py4
-rw-r--r--sources/pyside2/tests/QtLocation/location.py10
-rw-r--r--sources/pyside2/tests/QtMultimedia/audio_test.py4
-rw-r--r--sources/pyside2/tests/QtMultimediaWidgets/qmultimediawidgets.py4
-rw-r--r--sources/pyside2/tests/QtNetwork/accessManager_test.py4
-rw-r--r--sources/pyside2/tests/QtNetwork/bug_1084.py4
-rw-r--r--sources/pyside2/tests/QtNetwork/bug_446.py4
-rw-r--r--sources/pyside2/tests/QtNetwork/dnslookup_test.py6
-rw-r--r--sources/pyside2/tests/QtNetwork/qipv6address_test.py6
-rw-r--r--sources/pyside2/tests/QtNetwork/qpassworddigestor_test.py6
-rw-r--r--sources/pyside2/tests/QtNetwork/tcpserver_test.py6
-rw-r--r--sources/pyside2/tests/QtNetwork/udpsocket_test.py4
-rw-r--r--sources/pyside2/tests/QtOpenGL/qglbuffer_test.py4
-rw-r--r--sources/pyside2/tests/QtOpenGL/qglwidget_test.py7
-rw-r--r--sources/pyside2/tests/QtPositioning/positioning.py10
-rw-r--r--sources/pyside2/tests/QtPrintSupport/bug_500.py4
-rw-r--r--sources/pyside2/tests/QtPrintSupport/returnquadruplesofnumbers_test.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_1029.py8
-rw-r--r--sources/pyside2/tests/QtQml/bug_451.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_456.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_557.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_726.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_814.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_825.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_847.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_915.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_926.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_951.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_995.py4
-rw-r--r--sources/pyside2/tests/QtQml/bug_997.py4
-rw-r--r--sources/pyside2/tests/QtQml/connect_python_qml.py4
-rw-r--r--sources/pyside2/tests/QtQml/javascript_exceptions.py4
-rw-r--r--sources/pyside2/tests/QtQml/qqmlincubator_incubateWhile.py4
-rw-r--r--sources/pyside2/tests/QtQml/qqmlnetwork_test.py4
-rw-r--r--sources/pyside2/tests/QtQml/qquickitem_grabToImage.py4
-rw-r--r--sources/pyside2/tests/QtQml/qquickview_test.py4
-rw-r--r--sources/pyside2/tests/QtQml/registertype.py4
-rw-r--r--sources/pyside2/tests/QtQml/signal_arguments.py4
-rw-r--r--sources/pyside2/tests/QtScript/base_test.py7
-rw-r--r--sources/pyside2/tests/QtScript/bug_1022.py6
-rw-r--r--sources/pyside2/tests/QtScript/engine_test.py6
-rw-r--r--sources/pyside2/tests/QtScript/property_test.py6
-rw-r--r--sources/pyside2/tests/QtScript/qscriptvalue_test.py4
-rw-r--r--sources/pyside2/tests/QtScriptTools/debugger_test.py4
-rw-r--r--sources/pyside2/tests/QtScxml/test_dynamic.py4
-rw-r--r--sources/pyside2/tests/QtSensors/sensors.py10
-rw-r--r--sources/pyside2/tests/QtSql/bug_1013.py10
-rw-r--r--sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py6
-rw-r--r--sources/pyside2/tests/QtSql/qvarianttype_test.py4
-rw-r--r--sources/pyside2/tests/QtSvg/qsvggenerator_test.py9
-rw-r--r--sources/pyside2/tests/QtSvg/qsvgrenderer_test.py9
-rw-r--r--sources/pyside2/tests/QtSvg/qsvgwidget_test.py9
-rw-r--r--sources/pyside2/tests/QtTest/click_test.py4
-rw-r--r--sources/pyside2/tests/QtTest/eventfilter_test.py4
-rw-r--r--sources/pyside2/tests/QtTest/qvalidator_test.py4
-rw-r--r--sources/pyside2/tests/QtTest/touchevent_test.py4
-rw-r--r--sources/pyside2/tests/QtTextToSpeech/qtexttospeech_test.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_1060.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_360.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_376.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_392.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_426.py8
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_552.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_797.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_909.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_913.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_958.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/bug_965.py7
-rw-r--r--sources/pyside2/tests/QtUiTools/ui_test.py4
-rw-r--r--sources/pyside2/tests/QtUiTools/uiloader_test.py4
-rw-r--r--sources/pyside2/tests/QtWebEngine/web_engine_initialize.py6
-rw-r--r--sources/pyside2/tests/QtWebEngineCore/web_engine_custom_scheme.py4
-rw-r--r--sources/pyside2/tests/QtWebEngineWidgets/pyside-474-qtwebengineview.py6
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_448.py7
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_694.py6
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_803.py7
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_899.py4
-rw-r--r--sources/pyside2/tests/QtWebKit/bug_959.py4
-rw-r--r--sources/pyside2/tests/QtWebKit/qml_plugin_test.py4
-rw-r--r--sources/pyside2/tests/QtWebKit/qvariantlist_property_test.py4
-rw-r--r--sources/pyside2/tests/QtWebKit/shouldInterruptjavascript_test.py4
-rw-r--r--sources/pyside2/tests/QtWebKit/webframe_test.py4
-rw-r--r--sources/pyside2/tests/QtWebKit/webpage_test.py4
-rw-r--r--sources/pyside2/tests/QtWebKit/webview_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/action_clear.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/add_action_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/api2_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/application_test.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_1002.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_1006.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_1048.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_1077.py11
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_172.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_243.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_307.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_324.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_338.py5
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_363.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_389.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_400.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_416.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_429.py10
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_430.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_433.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_467.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_493.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_512.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_525.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_546.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_547.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_549.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_569.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_575.py10
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_576.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_585.py5
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_589.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_632.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_635.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_640.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_653.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_662.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_667.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_668.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_674.py11
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_675.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_688.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_693.py10
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_696.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_711.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_714.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_722.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_728.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_736.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_750.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_778.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_785.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_793.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_811.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_834.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_836.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_844.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_854.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_860.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_862.py9
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_871.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_879.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_919.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_921.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_941.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_964.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_967.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_972.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_979.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_988.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/bug_998.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/customproxywidget_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/event_filter_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/grandparent_method_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/hashabletype_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/keep_reference_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/missing_symbols_test.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/paint_event_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/parent_method_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/private_mangle_test.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/python_properties_test.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/qabstracttextdocumentlayout_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qaction_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qapp_issue_585.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/qapp_test.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/qapplication_exit_segfault_test.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/qapplication_test.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/qbrush_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qcolormap_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qdynamic_signal.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qfontdialog_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qformlayout_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsitem_isblocked_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsitem_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsobjectreimpl_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsproxywidget_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qgraphicsscene_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qimage_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qinputdialog_get_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qkeysequenceedit_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qlabel_test.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/qlayout_ref_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qlayout_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qlcdnumber_test.py6
-rw-r--r--sources/pyside2/tests/QtWidgets/qlistwidget_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qlistwidgetitem_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qmainwindow_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qmenu_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qmenuadd_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qobject_mi_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qpen_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qpicture_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qpixmap_constructor.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qpushbutton_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qshortcut_test.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/qsplitter_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qstandarditemmodel_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qstring_qkeysequence_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qstyle_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtableview_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtabwidget_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtabwidgetclear_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtextedit_signal_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtextedit_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtoolbar_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtoolbox_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtreeview_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qtreewidget_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qvariant_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qwidget_setlayout_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/qwidget_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/reference_count_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/signature_test.py7
-rw-r--r--sources/pyside2/tests/QtWidgets/standardpixmap_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/test_module_template.py8
-rw-r--r--sources/pyside2/tests/QtWidgets/virtual_protected_inheritance_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/virtual_pure_override_test.py4
-rw-r--r--sources/pyside2/tests/QtWidgets/wrong_return_test.py4
-rw-r--r--sources/pyside2/tests/QtXml/qdomdocument_test.py4
-rw-r--r--sources/pyside2/tests/QtXml/qxmlsimplereader_test.py7
-rw-r--r--sources/pyside2/tests/QtXmlPatterns/import_test.py4
-rw-r--r--sources/pyside2/tests/init_paths.py104
-rw-r--r--sources/pyside2/tests/mac/qmacstyle_test.py9
-rw-r--r--sources/pyside2/tests/pysidetest/all_modules_load_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/bug_1016.py10
-rw-r--r--sources/pyside2/tests/pysidetest/constructor_properties_test.py4
-rw-r--r--sources/pyside2/tests/pysidetest/decoratedslot_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/delegatecreateseditor_test.py8
-rw-r--r--sources/pyside2/tests/pysidetest/embedding_test.py6
-rw-r--r--sources/pyside2/tests/pysidetest/enum_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/homonymoussignalandmethod_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/iterable_test.py5
-rw-r--r--sources/pyside2/tests/pysidetest/list_signal_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/mixin_signal_slots_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/modelview_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/new_inherited_functions_test.py6
-rw-r--r--sources/pyside2/tests/pysidetest/notify_id.py7
-rw-r--r--sources/pyside2/tests/pysidetest/qapp_like_a_macro_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/qvariant_test.py6
-rw-r--r--sources/pyside2/tests/pysidetest/repr_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/signal_slot_warning.py10
-rw-r--r--sources/pyside2/tests/pysidetest/signalandnamespace_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/signalemissionfrompython_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/signalwithdefaultvalue_test.py7
-rw-r--r--sources/pyside2/tests/pysidetest/typedef_signal_test.py6
-rw-r--r--sources/pyside2/tests/pysidetest/version_test.py7
-rw-r--r--sources/pyside2/tests/registry/existence_test.py7
-rw-r--r--sources/pyside2/tests/signals/args_dont_match_test.py7
-rw-r--r--sources/pyside2/tests/signals/bug_189.py4
-rw-r--r--sources/pyside2/tests/signals/bug_311.py4
-rw-r--r--sources/pyside2/tests/signals/bug_312.py8
-rw-r--r--sources/pyside2/tests/signals/bug_319.py4
-rw-r--r--sources/pyside2/tests/signals/bug_79.py9
-rw-r--r--sources/pyside2/tests/signals/decorators_test.py6
-rw-r--r--sources/pyside2/tests/signals/disconnect_test.py10
-rw-r--r--sources/pyside2/tests/signals/invalid_callback_test.py6
-rw-r--r--sources/pyside2/tests/signals/lambda_gui_test.py4
-rw-r--r--sources/pyside2/tests/signals/lambda_test.py4
-rw-r--r--sources/pyside2/tests/signals/leaking_signal_test.py10
-rw-r--r--sources/pyside2/tests/signals/multiple_connections_gui_test.py4
-rw-r--r--sources/pyside2/tests/signals/multiple_connections_test.py4
-rw-r--r--sources/pyside2/tests/signals/pysignal_test.py4
-rw-r--r--sources/pyside2/tests/signals/qobject_destroyed_test.py6
-rw-r--r--sources/pyside2/tests/signals/qobject_receivers_test.py7
-rw-r--r--sources/pyside2/tests/signals/qobject_sender_test.py4
-rw-r--r--sources/pyside2/tests/signals/ref01_test.py7
-rw-r--r--sources/pyside2/tests/signals/ref02_test.py4
-rw-r--r--sources/pyside2/tests/signals/ref03_test.py9
-rw-r--r--sources/pyside2/tests/signals/ref04_test.py7
-rw-r--r--sources/pyside2/tests/signals/ref05_test.py4
-rw-r--r--sources/pyside2/tests/signals/ref06_test.py4
-rw-r--r--sources/pyside2/tests/signals/segfault_proxyparent_test.py6
-rw-r--r--sources/pyside2/tests/signals/self_connect_test.py4
-rw-r--r--sources/pyside2/tests/signals/short_circuit_test.py6
-rw-r--r--sources/pyside2/tests/signals/signal2signal_connect_test.py7
-rw-r--r--sources/pyside2/tests/signals/signal_autoconnect_test.py6
-rw-r--r--sources/pyside2/tests/signals/signal_connectiontype_support_test.py6
-rw-r--r--sources/pyside2/tests/signals/signal_emission_gui_test.py4
-rw-r--r--sources/pyside2/tests/signals/signal_emission_test.py4
-rw-r--r--sources/pyside2/tests/signals/signal_func_test.py6
-rw-r--r--sources/pyside2/tests/signals/signal_manager_refcount_test.py8
-rw-r--r--sources/pyside2/tests/signals/signal_number_limit_test.py7
-rw-r--r--sources/pyside2/tests/signals/signal_object_test.py4
-rw-r--r--sources/pyside2/tests/signals/signal_signature_test.py4
-rw-r--r--sources/pyside2/tests/signals/signal_with_primitive_type_test.py7
-rw-r--r--sources/pyside2/tests/signals/slot_reference_count_test.py8
-rw-r--r--sources/pyside2/tests/signals/static_metaobject_test.py4
-rw-r--r--sources/pyside2/tests/support/voidptr_test.py7
-rw-r--r--sources/pyside2/tests/util/py2xfunctions.py46
-rw-r--r--sources/pyside2/tests/util/py3kcompat.py50
-rw-r--r--sources/pyside2/tests/util/py3xfunctions.py54
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.h3
-rw-r--r--sources/shiboken2/ApiExtractor/typesystemparser.cpp4
-rw-r--r--sources/shiboken2/doc/typesystem_specifying_types.rst5
-rw-r--r--sources/shiboken2/generator/main.cpp2
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.cpp71
-rw-r--r--sources/shiboken2/generator/shiboken2/cppgenerator.h3
-rw-r--r--sources/shiboken2/generator/shiboken2/headergenerator.cpp13
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp29
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.h6
-rw-r--r--sources/shiboken2/libshiboken/bindingmanager.cpp8
-rw-r--r--sources/shiboken2/tests/py3kcompat.py38
-rw-r--r--sources/shiboken2/tests/shiboken_paths.py78
-rw-r--r--tools/create_changelog.py82
497 files changed, 2881 insertions, 509 deletions
diff --git a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
index 223eff77..12c1ac33 100644
--- a/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
+++ b/sources/pyside2/PySide2/QtQuick/typesystem_quick.xml
@@ -64,7 +64,7 @@
<object-type name="QQuickImageResponse" since="5.6"/>
<object-type name="QQuickTransform"/>
- <object-type name="QQuickItem" delete-in-main-thread="true">
+ <object-type name="QQuickItem" delete-in-main-thread="true" no-override-caching="true">
<value-type name="UpdatePaintNodeData"/>
<enum-type name="Flag" flags="Flags"/>
<enum-type name="ItemChange"/>
diff --git a/sources/pyside2/doc/considerations.rst b/sources/pyside2/doc/considerations.rst
index c8d24d13..f05d929b 100644
--- a/sources/pyside2/doc/considerations.rst
+++ b/sources/pyside2/doc/considerations.rst
@@ -22,7 +22,7 @@ same hash.
QString
-~~~~~~~~
+~~~~~~~
Methods and functions that change the contents of a QString argument were modified to receive an
immutable Python Unicode (or str) and return another Python Unicode/str as the modified string.
@@ -83,3 +83,53 @@ its original Python object type.
When a method expects a ``QVariant::Type`` the programmer can use a string (the type name) or the
type itself.
+
+
+qApp "macro"
+~~~~~~~~~~~~
+
+The C++ API of QtWidgets provides a macro called ``qApp`` that roughly expands to
+``QtWidgets::QApplication->instance()``.
+
+In PySide, we tried to create a macro-like experience.
+For that, the ``qApp`` variable was implemented as a normal variable
+that lives in the builtins.
+After importing ``PySide2``, you can immediately use ``qApp``.
+
+As a useful shortcut for the action "create an application if it was not created", we recommend::
+
+ qApp or QtWidgets.QApplication()
+
+or if you want to check if there is one, simply use the truth value::
+
+ if qApp:
+ # do something if an application was created
+ pass
+
+Comparing to ``None`` is also possible, but slightly over-specified.
+
+
+Testing support
++++++++++++++++
+
+For testing purposes, you can also get rid of the application by calling::
+
+ qApp.shutdown()
+
+As for 5.14.2, this is currently an experimental feature that is not fully tested.
+
+
+Embedding status
+++++++++++++++++
+
+In embedded mode, application objects that are pre-created in C++ don't have a Python wrapper.
+The ``qApp`` variable is created together with a wrapped application.
+Therefore, ``qApp`` does not exist in that embedded mode.
+Please note that you always can use ``QtWidgets.QApplication.instance()`` instead.
+
+
+Abandoned Alternative
++++++++++++++++++++++
+
+We also tried an alternative implementation with a ``qApp()`` function that was more *pythonic*
+and problem free, but many people liked the ``qApp`` macro better for its brevity, so here it is.
diff --git a/sources/pyside2/tests/CMakeLists.txt b/sources/pyside2/tests/CMakeLists.txt
index 08585252..60179d81 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 2f7cc21a..97ddc8af 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 6605c221..dc10fceb 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 f9761a9d..558fe0e2 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 2f8b95b2..c3497c89 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 bc4b9b67..404e71bf 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 1fb0d6eb..6a7f248c 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 1daaaa4d..73291bff 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 d784062e..690553e7 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 e0f07d11..cc99136e 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 662a0f63..f49845cf 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 b2f97df6..bdb7c1af 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 d1504876..b4c8f963 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 5186ac75..e929be0a 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 c1d434c7..4db6b801 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 d4ca3f46..a96a8c19 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 44126e94..423b088d 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 1b9fe6a9..d3cd05f2 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 fa8ad8d6..6e4f8994 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 98340f3d..c86c485f 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 1984cfff..21743bf2 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 f5595429..5d45f682 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 b5701fc5..cb72e011 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 1384c017..237ae040 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 59cb612a..e72ce500 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 19672766..b0cd84e6 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 1a5be71f..1883bf5e 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 528a0847..8220ecab 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 6cbf5018..bbac1845 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 2aa2b638..a250ebe3 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 e5c7f1b0..56e5e517 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 53e822bf..1a9649a1 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 3ed10be5..96c892fd 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 9555bb41..46e3c6d1 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 4a6ea679..8c600210 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 a1890f95..634e8f35 100644
--- a/sources/pyside2/tests/QtCore/classinfo_test.py
+++ b/sources/pyside2/tests/QtCore/classinfo_test.py
@@ -27,8 +27,14 @@
#############################################################################
import sys
+import os
+import sys
import unittest
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
from PySide2.QtCore import QObject, QCoreApplication, ClassInfo
class TestClassInfo(unittest.TestCase):
diff --git a/sources/pyside2/tests/QtCore/deepcopy_test.py b/sources/pyside2/tests/QtCore/deepcopy_test.py
index 87fbe7a8..ab17a2e1 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 1a0fbca1..62268c1d 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 37e78206..1396a487 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 27eaf341..3450314d 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 2e052287..0bf088de 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 6e8a4aaa..9ef1dfe0 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 1f5fa49e..d8b68d81 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 1f7e7f82..46fd1ba4 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 ac882801..a69603e1 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 1b730e71..9fb689e6 100644
--- a/sources/pyside2/tests/QtCore/mockclass_test.py
+++ b/sources/pyside2/tests/QtCore/mockclass_test.py
@@ -30,7 +30,14 @@
# http://bugs.pyside.org/show_bug.cgi?id=634
# Marcus Lindblom <macke@yar.nu>; 2011-02-16
+import os
+import sys
import unittest
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from init_paths import init_test_paths
+init_test_paths(False)
+
from PySide2.QtCore import QCoreApplication
class Mock(object):
diff --git a/sources/pyside2/tests/QtCore/python_conversion.py b/sources/pyside2/tests/QtCore/python_conversion.py
index d10ecea5..a32529a1 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 bc698d3d..a63f3729 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 fd8d01c9..2901f4dc 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 24791451..063d266d 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 08b410aa..961d1a75 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 72117ad7..d8d1d514 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 93527f9d..20f8fa91 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 a3986278..1375c3ab 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 15d870bd..d0a65465 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 69d016a6..b1917942 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 99813425..8f1c9c20 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 4b595a01..e75931ad 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 2ac46673..ec99e04f 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 231ce5bb..3aa33240 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 207dbbe7..a947cf48 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 ad1dee0b..1e1a6420 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 15a90584..b9907abb 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 b50b1d15..a2d2908b 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 8c3ddb0d..911a042b 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 9da51427..4d98156d 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 3975d1f2..82d45f97 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 ada625f2..dd91d158 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 c390c6af..a3e4f711 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 69208a49..960d0d1d 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 16e606a2..07b37cc5 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 16d9082f..1a9afd1a 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 7d558424..08a7c55b 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 db780446..76dfbd32 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 f14c8931..f46ace5a 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 65f83abe..3f8a9c84 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 2261602c..084937c0 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 44374f80..7c797339 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 e943af2b..38b6b7c4 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 2a63e25a..225807b9 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 81a3e701..d79abb1d 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 1e4e3b57..78ce5532 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 770600ea..83f9d848 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 2b6218aa..a5604bb7 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 74db16ff..5d9d8052 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 ef322cb3..d9477923 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 4b372df3..ff46bc79 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 3a87da34..bc6e0065 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 bade8fe4..b2c6305c 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 85b70913..7e98100a 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 80d652ab..0592bf65 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 26376e44..3af811e9 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 ade885e7..dd577ecd 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 7abc1528..bdf07465 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 ee416d08..bbcd0b99 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 82c571d1..bd0ba66d 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 e7766277..e73c37e5 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 72b2e08c..eb5753f4 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 c6f0d3c3..aa31e59c 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 2b732ad5..170a3166 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 bcf9f95b..9116d7b5 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 36d3b07c..a031137f 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 cef3ec66..fb2e9c24 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 95378679..3ec92503 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 97aa7522..982ddc38 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 1bc7779f..1bf31fae 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 7a2691a0..252a09be 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 0a9b78af..cd3d783d 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 459bfeb5..cdad7823 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 957aa4e1..67c7b4a9 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 8627f4bb..4c97fecc 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 388d9ed0..19dcb1e8 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 783b5956..c7ae1487 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 95900bc2..c415fdc3 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 7e25e4fe..0f53a9cf 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 5506c202..9e41c38c 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 a5a587d3..bd25367c 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 ee3ed1a4..9ff62c15 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 31b148a0..bb3423bd 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 73683e50..2ba5a536 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 9b2a1567..41fe4ac9 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 54ff63bc..4f038ddf 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 3b9512be..8c960371 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 06dece28..fbf92b6d 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 b0333d53..8c2b43e9 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 652a9a88..ac7ab69b 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 c881383e..da34429f 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 d98e320f..e0d734ee 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 4bac44c2..71bab833 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 ea3690f9..e149f8ff 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 7fdfaf41..bb5c5d18 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 28189df4..e3a7e179 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 9800d2e0..61cbcc53 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 42cf4a52..369db9fc 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 1dfeedee..0f36067b 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 ea5813a5..2fd06cd4 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 3dee24f4..3f1a4d8d 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 6fff9710..c682dbbd 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 2ff705ee..af6e5f5d 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 28f7d9be..74c0000a 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 c2c1bc9c..d5da0a41 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 2780df5c..5080295b 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 506dbf53..41b83e10 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 6f01b579..4f2a4b46 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 370d6469..32e1fc05 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 92b2d5a8..c80709f9 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 f2a50fd3..058364d1 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 f2973949..d68b11d0 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 bfd9a03f..a4db6e5a 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 75933ae2..2ad0a061 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 43af0832..1af304a2 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 0946d70e..f050008a 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 128a6574..15967a51 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 b9991264..d4dcdd64 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 9277fecb..5e8747a0 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 b4e98c69..f3c7c3e8 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 7f904fd1..adb07fbf 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 021e7c12..55554b6c 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 02c0fe51..7adc3478 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 9c35cd45..c9b5c16a 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 e3c26719..97bf97de 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 5b5c7d2b..cbf0b069 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 d1a04465..b761cf24 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 a8763e65..f3ad498e 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 4bb0375f..8e9639a3 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 be28e5de..22679340 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 bc6a2b8a..48380faf 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 c80bd41b..a5d8385c 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 316b3920..e39cfb19 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 77cea835..d86e69b6 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 dbda6613..aae636d3 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 fb0c1061..30ea213d 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 d59fa028..7d2d75bc 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 a0e8dc03..672ea79d 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 023af533..a21518a7 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 c9f5bd8b..728a721f 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 5bb13600..f18ceaaf 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 085fcec3..3e05617e 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 a771d38f..3cecfa60 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 f1376aa5..765a6b5b 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 ce5474b4..1cbb8ff2 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 f13ba884..d9d96dd3 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 5abdc076..92af7b82 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 f121868b..29f9b86b 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 bcf27631..e06f4d48 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 89731005..1f873fa0 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 e99214d4..42814a30 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 b81078b2..54f74b8f 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 e3c2f546..151470a2 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 97352988..f242865f 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 99d4bba8..f7ad812e 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 95c882d2..12ed2531 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 947ba146..d2c273fc 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 91333ef7..f15ff01f 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 b0375b0f..3a8b7a2d 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 04e6c3fc..046d4d85 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 503ffecd..13da3e73 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 afa33289..9a047e5c 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 fc7f7b0d..da5a21c2 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 56812e0f..e633d6ee 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 8779578b..c3bb7e27 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 1b3e263e..8b9b715c 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 0a13da7d..43146d02 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 1ca9431c..573ca994 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 92734cb3..36306e4a 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 f6405ffc..f8768063 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 0ecc012f..a99ce2b8 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 a8b33086..20892475 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 4594a43b..795d8a13 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 5b38f134..c6f0b844 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 fcf0fac2..019653e9 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 7347e164..ac583645 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 74cc30d4..9c888b4a 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 2eb958d8..0764b8e9 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 2223b2a5..8919f588 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 9a83a811..945cd5bc 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 9d4efff7..597e253e 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 31569b7a..22134efe 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 2cf81fc8..a5e6a4b4 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 28164654..f33d852a 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 4ea5f8d1..2cc27343 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 a9618a92..6735d523 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 e0b35dc5..0b723612 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 be15b87e..7e6fe8d2 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 d46a34fc..98b52c05 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 4343a6d7..3cde8ad8 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 63866ec3..2c2699de 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 2b228281..f88b98d6 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 a5c9f059..372bba2b 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 e5f2a073..06a02923 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 a5ec8867..cefe48f5 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 2a9ad97d..51672a9b 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 2f25adeb..360d6899 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 3b8fb5d0..3cade31f 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 5bb034aa..7db28b99 100644
--- a/sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py
+++ b/sources/pyside2/tests/QtSql/qsqldatabaseandqueries_test.py
@@ -31,8 +31,14 @@
'''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 266cafa2..3175a178 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 2b3bed75..e4680f6c 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 ee276ae9..88537edf 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 59cf35d6..17bf6527 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 48b01e30..8b3be38e 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 c087e255..6ca61c36 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 d3ac5571..021e455f 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 0105ac68..8f9b8846 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 6bf8f85b..4881bd25 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 22da11a8..f6091278 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 6af5ff49..8d15f273 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 1da380fd..264faad7 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 9b5782f2..2439e720 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 5b055a45..e84da038 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 7a053089..be42789c 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 0fb7ed43..45469919 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 5c9c1252..9831b6b0 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 b0a871b8..3e2ca818 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 f631d36e..98ac1618 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 a8fabe72..217f948a 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 2fe78fba..6705bb0b 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 4f588171..48b40142 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 f6abeb9c..1f0482f9 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 7fc879fa..190810ed 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 a56d6d0f..a40e2988 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 c8341840..98ebb195 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 60fb37f8..b18d658f 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 ea2b34ce..ec6f93c3 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 68121044..cb8e7678 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 6ddf2554..5214ee1e 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 5cb6cee5..33497bdc 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 aeee109d..6a51a648 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 722fc63d..4db5adbb 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 b92174c8..d46c1b22 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 22ad1ff9..0c37befa 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 06e5b7d0..5ecac538 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 b8a6ad59..ed815049 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 1dbc5d54..c8a7c226 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 151ebb9f..379d3e99 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 efb41684..a5b949ec 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 c25209d2..2810ca07 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 8b7ab780..f7d4af80 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 2042a99c..1b2189a7 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 7943e555..cb3bf70c 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 5b082255..c9cc8d08 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 7ce0a468..bf5fa2ea 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 0a0e9faa..d3e8ba9d 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 fbaf4373..c6e5a757 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 e51cb152..ca095a61 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 a5abb4db..910525fe 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 bd18705a..dcc4a5df 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 e98ce3d2..03f82a14 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 f88f3965..092abeba 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 dea855f3..9b2fb9c4 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 89f6f795..81a8d34f 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 a214b2cc..ab316db1 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 d26b4424..ee2da71d 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 19cbb002..a981952f 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 5d1cab9b..45f127c7 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 842a4406..bb024449 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 a56406cc..3fadcfae 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 ac200071..070b2f81 100644
--- a/sources/pyside2/tests/QtWidgets/bug_547.py
+++ b/sources/pyside2/tests/QtWidgets/bug_547.py
@@ -30,8 +30,14 @@
""" 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 0e2afc65..7da9cca8 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 4e3d07c3..cf95467c 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 4996c698..425a659e 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 b0b04449..9674f7a9 100644
--- a/sources/pyside2/tests/QtWidgets/bug_576.py
+++ b/sources/pyside2/tests/QtWidgets/bug_576.py
@@ -30,8 +30,14 @@
""" 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 1c5eb75f..a0e5c0b5 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 c75a12f7..8f81384a 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 e6041610..d836b2ff 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 59f27fa2..6707c3f0 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 9e63a1d7..13d98aa4 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 e1b2ed41..df7dbacd 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 a5cc650c..7fb97deb 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 e2b47229..cbbd57c2 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 05cffa39..42d95625 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 40fd1920..1c8f5533 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 93489064..1e54f1b8 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 4627d804..97d62e2c 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 31b0262c..68d19e00 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 5af193ff..abd4246a 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 073d4e3c..43e4b7bb 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 345207ff..76cf0295 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 1cdf7ff4..7eae897d 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 59269d72..5cd39b66 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 31ce80e5..4e040f96 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 78d333ef..20f2d5d5 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 c5615b06..148ae5ae 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 312b1799..ba18a99a 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 3d63cae2..37eddfd5 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 aa0ebfae..fd618fba 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 129da321..9dba711e 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 69e23e2d..4d995ddc 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 82286329..a14e3afc 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 60d843b6..acfa1c27 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 7440b261..8cdab2e4 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 4621fc3b..96aeb6f1 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 a3759cb9..4a53b98a 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 59eb979a..981be039 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 4ef133fa..40ba94d2 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 9380a08f..56abe097 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 562be9a3..074fde8e 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 9c7af6c5..a160afd1 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 64304110..19d6b1e4 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 a5299eeb..15bf949a 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 4bc0c966..c5d65c36 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 e74edac8..93c2cc1a 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 8e0c96e5..7c7587dd 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 051f31a7..7082fb12 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 a367c034..fe18a364 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 6e64a047..6b8fcbab 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 356afd8b..0c3f045c 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 c250da24..c0139ed9 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 de243c4b..064ed0b7 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 1b715ce2..d57a523e 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 2f00a72d..ef8e9ca8 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 5ad10c7b..75545537 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 f4e46f2b..fb167929 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 c08c9e95..8e291bb6 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 7ee74fff..8fc8f6c0 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 f124ee6a..d7afdec3 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 0bd91931..cda34be7 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 f74ced66..f7008646 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 b29aba6a..0fc174e8 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 78f32c7b..97b1e824 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 6166b32f..1123b0d2 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 3b14ab3f..4b9f7633 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 97fe9d79..b9706e4e 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 0b38f675..ff5a13ae 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 524ca6fa..e40dff6f 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 8787b617..27d543a7 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 11825e42..46569cc1 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 59796142..54f95880 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 8c521369..cb1867b8 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 51f4fcd5..8bb83c51 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 69d1613b..0aaf548c 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 d85d20aa..150eb3d3 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 c8e8e261..19387dee 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 09b80879..9f0b4cca 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 8077e3bd..3882761e 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 6da0a31b..e079d6dd 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 6fab3fb3..732f3859 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 2da159bc..b2385269 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 50c992f1..c1cd106b 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 c1d03393..9c5b12b2 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 c2881b20..f4ecbb39 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 032229e4..6934229c 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 9469cb10..0acb8c27 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 002be64e..3a5747e4 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 7e44e92b..38f9b4ad 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 7fb17d92..896d4935 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 7faaf6f9..18aec285 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 2c792a63..f375c820 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 5b41af46..f1c360b8 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 80eba412..0321b69a 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 0452ca0f..60130a14 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 e97c5567..040f8b91 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 5b2ebbde..fc4f98c1 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 75e0e4da..c0c25d95 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 aa10fb9d..aef06448 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 d809ebfc..d06cb4f8 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 956c72ee..856bf07f 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 e9cf086a..9fdd5395 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 6673d36b..8824088d 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 ec3724f6..6700f82c 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 8a9bf152..d4da7d4b 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 f06ebb74..4ac9e4e0 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 ed6a0226..74e97d7b 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 7b541235..a6ba302f 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 3a0114b0..57fcf387 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 c907c820..12a5bea8 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 cc61fcf6..17500480 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 56580fc1..4e6651ce 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 4ee56152..78ad0404 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 8fad3d62..d95ae763 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 3ff29650..67da9952 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 77049538..a30d68cd 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 0c6f7418..09032909 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 00000000..9cfdebc8
--- /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 4a65a144..091f9591 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 e802685f..10ccc522 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 c2b70933..9f035e0e 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 e84a4546..139091fe 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 47878ed8..3825f48a 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 82967a17..1378ca8a 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 aa71360c..1960838f 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 428e087f..d179d624 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 906d0ddb..1566b4a8 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 2f488875..c5685112 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 a438f0c8..d66ba790 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 44bb33be..d0b40cfa 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 a0f723c4..a4ae9dd4 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 09e5f261..81a76498 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 d96e8d91..393736a6 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 2cc18c9c..bfcf4011 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 8f8b8b96..0efece88 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 295084f1..356d1191 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 84ddc23d..a54974c3 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 9bb42ea4..f56beaf8 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 43b31f5c..ed7302c6 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 11951fb0..fc13fc0d 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 f7724b61..ecbfa35d 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 447fafde..5cc34d8c 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 6db88a81..4bfd63cc 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 f50611ad..732706ac 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 a2365842..6492f035 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 36e022a5..c9782741 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 08019654..1b6eabe7 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 f42add3c..17cd8abc 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 4a595912..ca25fb3f 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 e5a8be46..e262f0bc 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 79c33ed7..6242e9e3 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 b3b301d6..442720ba 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 4f33adda..843b4037 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 2a3f0139..f0109615 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 f8ac041b..705d1607 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 d4104b5c..4429c49f 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 8172596b..a8f5bcd9 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 bdb62b5b..5561671c 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 87e78c22..35752a6c 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 629fda5c..8ad89fe7 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 10805451..ce11b803 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 e12dfc91..d2c65856 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 e7659246..9a31b4b5 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 da24da65..25f404f3 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 033449cc..4c66c04e 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 848bf89d..3b7bf198 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 adba267b..51d78e63 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 758c7888..2d45f1e7 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 61280474..cca97b09 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 e181b649..61acc77c 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 4619a869..c5008c94 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 9fe8f94d..b19f28ab 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 d8dee945..00865a95 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 4b36336f..d46e78c5 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 e45902ab..f9c221e8 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 37bb191f..0026bc72 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 ece9a3ce..6942f983 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 ba1edac2..67bb63e4 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 76b859a4..bf4abedb 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 da19862f..1f661de0 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 cc3f084d..f7f691f3 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 e6bcda0e..7885a358 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 a6cca5ca..bdb3b199 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 f6821724..9e3668eb 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
diff --git a/sources/pyside2/tests/util/py2xfunctions.py b/sources/pyside2/tests/util/py2xfunctions.py
deleted file mode 100644
index 11bc6826..00000000
--- a/sources/pyside2/tests/util/py2xfunctions.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-def b(s):
- return s
-
-def l(n):
- return long(n)
-
-def unicode_(s):
- if type(s) == str:
- import codecs
- c = codecs.lookup('utf-8')
- s2 = c.decode(s, 'ignore')
- return s2[0]
- return u'%s' % s
-
-unicode = unicode
-unichr = unichr
-long = long
-buffer = buffer
diff --git a/sources/pyside2/tests/util/py3kcompat.py b/sources/pyside2/tests/util/py3kcompat.py
index b58181ff..bd90973e 100644
--- a/sources/pyside2/tests/util/py3kcompat.py
+++ b/sources/pyside2/tests/util/py3kcompat.py
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
+
#############################################################################
##
-## Copyright (C) 2016 The Qt Company Ltd.
+## 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.
@@ -27,12 +28,55 @@
##
#############################################################################
+# Copy of ../../../shiboken2/tests/py3kcompat.py
+
import sys
IS_PY3K = sys.version_info[0] == 3
if IS_PY3K:
- from py3xfunctions import b, l, unicode_, unicode, unichr, long, unichr, buffer
+ def b(s):
+ if type(s) == bytes:
+ return s
+ return bytes(s, "UTF8")
+
+ def buffer_(s):
+ if s == None:
+ return None
+ elif type(s) == str:
+ return bytes(s, "UTF8")
+ elif type(s) == bytes:
+ return s
+ else:
+ memoryview(s)
+
+ def l(n):
+ return n
+
+ def unicode_(s):
+ return s
+
+ unicode = str
+ unichr = chr
+ long = int
+ unichr = chr
+ buffer = buffer_
else:
- from py2xfunctions import b, l, unicode_, unicode, unichr, long, unichr, buffer
+ def b(s):
+ return s
+
+ def l(n):
+ return long(n)
+
+ def unicode_(s):
+ if type(s) == str:
+ import codecs
+ c = codecs.lookup('utf-8')
+ s2 = c.decode(s, 'ignore')
+ return s2[0]
+ return u'%s' % s
+ unicode = unicode
+ unichr = unichr
+ long = long
+ buffer = buffer
diff --git a/sources/pyside2/tests/util/py3xfunctions.py b/sources/pyside2/tests/util/py3xfunctions.py
deleted file mode 100644
index 2d84c472..00000000
--- a/sources/pyside2/tests/util/py3xfunctions.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the test suite of Qt for Python.
-##
-## $QT_BEGIN_LICENSE:GPL-EXCEPT$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 3 as published by the Free Software
-## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-def b(s):
- if type(s) == bytes:
- return s
- return bytes(s, "UTF8")
-
-def buffer_(s):
- if s == None:
- return None
- elif type(s) == str:
- return bytes(s, "UTF8")
- elif type(s) == bytes:
- return s
- else:
- memoryview(s)
-
-def l(n):
- return n
-
-def unicode_(s):
- return s
-
-unicode = str
-unichr = chr
-long = int
-unichr = chr
-buffer = buffer_
diff --git a/sources/shiboken2/ApiExtractor/typesystem.h b/sources/shiboken2/ApiExtractor/typesystem.h
index 790fb95c..2324e8b7 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.h
+++ b/sources/shiboken2/ApiExtractor/typesystem.h
@@ -1179,7 +1179,8 @@ class ComplexTypeEntry : public TypeEntry
{
public:
enum TypeFlag {
- Deprecated = 0x4
+ Deprecated = 0x4,
+ NoOverrideCaching = 0x8
};
Q_DECLARE_FLAGS(TypeFlags, TypeFlag)
diff --git a/sources/shiboken2/ApiExtractor/typesystemparser.cpp b/sources/shiboken2/ApiExtractor/typesystemparser.cpp
index 55b079ed..efdab8be 100644
--- a/sources/shiboken2/ApiExtractor/typesystemparser.cpp
+++ b/sources/shiboken2/ApiExtractor/typesystemparser.cpp
@@ -60,6 +60,7 @@ static inline QString untilAttribute() { return QStringLiteral("until"); }
static inline QString defaultSuperclassAttribute() { return QStringLiteral("default-superclass"); }
static inline QString deleteInMainThreadAttribute() { return QStringLiteral("delete-in-main-thread"); }
static inline QString deprecatedAttribute() { return QStringLiteral("deprecated"); }
+static inline QString noOverrideCachingAttribute() { return QStringLiteral("no-override-caching"); }
static inline QString exceptionHandlingAttribute() { return QStringLiteral("exception-handling"); }
static inline QString extensibleAttribute() { return QStringLiteral("extensible"); }
static inline QString fileNameAttribute() { return QStringLiteral("file-name"); }
@@ -1534,6 +1535,9 @@ void TypeSystemParser::applyComplexTypeAttributes(const QXmlStreamReader &reader
} else if (name == deprecatedAttribute()) {
if (convertBoolean(attributes->takeAt(i).value(), deprecatedAttribute(), false))
ctype->setTypeFlags(ctype->typeFlags() | ComplexTypeEntry::Deprecated);
+ } else if (name == noOverrideCachingAttribute()) {
+ if (convertBoolean(attributes->takeAt(i).value(), noOverrideCachingAttribute(), false))
+ ctype->setTypeFlags(ctype->typeFlags() | ComplexTypeEntry::NoOverrideCaching);
} else if (name == deleteInMainThreadAttribute()) {
if (convertBoolean(attributes->takeAt(i).value(), deleteInMainThreadAttribute(), false))
ctype->setDeleteInMainThread(true);
diff --git a/sources/shiboken2/doc/typesystem_specifying_types.rst b/sources/shiboken2/doc/typesystem_specifying_types.rst
index 5d086f4d..d296ccc8 100644
--- a/sources/shiboken2/doc/typesystem_specifying_types.rst
+++ b/sources/shiboken2/doc/typesystem_specifying_types.rst
@@ -309,6 +309,7 @@ object-type
allow-thread="..."
exception-handling="..."
hash-function="..."
+ no-override-caching="yes | no"
stream="yes | no"
revision="..." />
</typesystem>
@@ -332,6 +333,10 @@ object-type
specify the default handling for the corresponding function modification
(see :ref:`modify-function`).
+ The *optional* attribute **no-override-caching** can be used to turn off the
+ caching of methods overridden in Python, which can trigger obscure bugs when
+ setting attributes in Python 2.
+
interface-type
^^^^^^^^^^^^^^
diff --git a/sources/shiboken2/generator/main.cpp b/sources/shiboken2/generator/main.cpp
index 089ecb48..e4d86f48 100644
--- a/sources/shiboken2/generator/main.cpp
+++ b/sources/shiboken2/generator/main.cpp
@@ -370,7 +370,7 @@ static void parseIncludePathOption(const QString &option, HeaderType headerType,
const CommandArgumentMap::iterator it = args.find(option);
if (it != args.end()) {
const QStringList includePathListList =
- it.value().split(pathSplitter, QString::SkipEmptyParts);
+ it.value().split(pathSplitter, Qt::SkipEmptyParts);
args.erase(it);
for (const QString &s : includePathListList) {
auto path = QFile::encodeName(QDir::cleanPath(s));
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
index 5697a24e..9e7b96c7 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
@@ -414,18 +414,17 @@ void CppGenerator::generateClass(QTextStream &s, GeneratorContext &classContext)
}
const AbstractMetaFunctionList &funcs = filterFunctions(metaClass);
+ int maxOverrides = 0;
+ writeCacheResetNative(s, metaClass);
for (const AbstractMetaFunction *func : funcs) {
const bool notAbstract = !func->isAbstract();
if ((func->isPrivate() && notAbstract && !visibilityModifiedToPrivate(func))
|| (func->isModifiedRemoved() && notAbstract))
continue;
- if (func->functionType() == AbstractMetaFunction::ConstructorFunction && !func->isUserAdded()) {
+ if (func->functionType() == AbstractMetaFunction::ConstructorFunction && !func->isUserAdded())
writeConstructorNative(s, func);
- } else if ((!avoidProtectedHack() || !metaClass->hasPrivateDestructor())
- && ((func->isVirtual() || func->isAbstract())
- && (func->attributes() & AbstractMetaAttributes::FinalCppMethod) == 0)) {
- writeVirtualMethodNative(s, func);
- }
+ else if (shouldWriteVirtualMethodNative(func))
+ writeVirtualMethodNative(s, func, maxOverrides++);
}
if (!avoidProtectedHack() || !metaClass->hasPrivateDestructor()) {
@@ -695,6 +694,14 @@ void CppGenerator::generateClass(QTextStream &s, GeneratorContext &classContext)
}
}
+void CppGenerator::writeCacheResetNative(QTextStream &s, const AbstractMetaClass *metaClass)
+{
+ Indentation indentation(INDENT);
+ s << "void " << wrapperName(metaClass) << "::resetPyMethodCache()\n{\n";
+ s << INDENT << "std::fill_n(m_PyMethodCache, sizeof(m_PyMethodCache) / sizeof(m_PyMethodCache[0]), false);\n";
+ s << "}\n\n";
+}
+
void CppGenerator::writeConstructorNative(QTextStream &s, const AbstractMetaFunction *func)
{
Indentation indentation(INDENT);
@@ -704,6 +711,7 @@ void CppGenerator::writeConstructorNative(QTextStream &s, const AbstractMetaFunc
writeFunctionCall(s, func);
s << "\n{\n";
const AbstractMetaArgument *lastArg = func->arguments().isEmpty() ? nullptr : func->arguments().constLast();
+ s << INDENT << "resetPyMethodCache();\n";
writeCodeSnips(s, func->injectedCodeSnips(), TypeSystem::CodeSnipPositionBeginning, TypeSystem::NativeCode, func, lastArg);
s << INDENT << "// ... middle\n";
writeCodeSnips(s, func->injectedCodeSnips(), TypeSystem::CodeSnipPositionEnd, TypeSystem::NativeCode, func, lastArg);
@@ -763,7 +771,9 @@ QString CppGenerator::getVirtualFunctionReturnTypeName(const AbstractMetaFunctio
+ typeEntry->qualifiedCppName() + QLatin1String(" >())->tp_name");
}
-void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFunction *func)
+void CppGenerator::writeVirtualMethodNative(QTextStream &s,
+ const AbstractMetaFunction *func,
+ int cacheIndex)
{
//skip metaObject function, this will be written manually ahead
if (usePySideExtensions() && func->ownerClass() && func->ownerClass()->isQObject() &&
@@ -838,6 +848,28 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
s << Qt::endl;
}
+ // PYSIDE-803: Build a boolean cache for unused overrides.
+ bool multi_line = retType == nullptr; // set to true when using instrumentation
+ s << INDENT << "if (m_PyMethodCache[" << cacheIndex << "])" << (multi_line ? " {\n" : "\n");
+ {
+ Indentation indentation(INDENT);
+ s << INDENT;
+ if (retType)
+ s << "return ";
+ if (!func->isAbstract()) {
+ s << "this->::" << func->implementingClass()->qualifiedCppName() << "::";
+ writeFunctionCall(s, func, Generator::VirtualCall);
+ } else {
+ if (retType)
+ s << ' ' << defaultReturnExpr.returnValue();
+ }
+ if (!retType)
+ s << ";\n" << INDENT << "return";
+ s << ";\n";
+ }
+ if (multi_line)
+ s << INDENT << "}\n";
+
s << INDENT << "Shiboken::GilState gil;\n";
// Get out of virtual method call if someone already threw an error.
@@ -870,7 +902,10 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
s << ' ' << defaultReturnExpr.returnValue();
} else {
s << INDENT << "gil.release();\n";
- s << INDENT;
+ if (useOverrideCaching(func->ownerClass())) {
+ s << INDENT << "m_PyMethodCache[" << cacheIndex << "] = true;\n";
+ s << INDENT;
+ }
if (retType)
s << "return ";
s << "this->::" << func->implementingClass()->qualifiedCppName() << "::";
@@ -880,7 +915,7 @@ void CppGenerator::writeVirtualMethodNative(QTextStream &s, const AbstractMetaFu
}
}
s << ";\n";
- s << INDENT<< "}\n\n";
+ s << INDENT << "}\n\n"; //WS
writeConversionRule(s, func, TypeSystem::TargetLangCode);
@@ -1477,10 +1512,10 @@ void CppGenerator::writeConverterRegister(QTextStream &s, const AbstractMetaClas
QStringList cppSignature;
if (!classContext.forSmartPointer()) {
cppSignature = metaClass->qualifiedCppName().split(QLatin1String("::"),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
} else {
cppSignature = classContext.preciseType()->cppSignature().split(QLatin1String("::"),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
}
while (!cppSignature.isEmpty()) {
QString signature = cppSignature.join(QLatin1String("::"));
@@ -1928,7 +1963,7 @@ void CppGenerator::writeArgumentsInitializer(QTextStream &s, OverloadData &overl
s << INDENT << "PyObject *";
s << PYTHON_ARGS << "[] = {"
- << QString(maxArgs, QLatin1Char('0')).split(QLatin1String(""), QString::SkipEmptyParts).join(QLatin1String(", "))
+ << QString(maxArgs, QLatin1Char('0')).split(QLatin1String(""), Qt::SkipEmptyParts).join(QLatin1String(", "))
<< "};\n";
s << Qt::endl;
@@ -5238,6 +5273,16 @@ void CppGenerator::writeSetattroFunction(QTextStream &s, AttroCheck attroCheck,
Q_ASSERT(!context.forSmartPointer());
const AbstractMetaClass *metaClass = context.metaClass();
writeSetattroDefinition(s, metaClass);
+ // PYSIDE-803: Detect duck-punching; clear cache if a method is set.
+ if (attroCheck.testFlag(AttroCheckFlag::SetattroMethodOverride)
+ && ShibokenGenerator::shouldGenerateCppWrapper(metaClass)) {
+ s << INDENT << "if (value && PyCallable_Check(value)) {\n";
+ s << INDENT << " auto plain_inst = " << cpythonWrapperCPtr(metaClass, QLatin1String("self")) << ";\n";
+ s << INDENT << " auto inst = dynamic_cast<" << wrapperName(metaClass) << " *>(plain_inst);\n";
+ s << INDENT << " if (inst)\n";
+ s << INDENT << " inst->resetPyMethodCache();\n";
+ s << INDENT << "}\n";
+ }
if (attroCheck.testFlag(AttroCheckFlag::SetattroQObject)) {
s << INDENT << "Shiboken::AutoDecRef pp(reinterpret_cast<PyObject *>(PySide::Property::getObject(self, name)));\n";
s << INDENT << "if (!pp.isNull())\n";
@@ -5771,7 +5816,7 @@ bool CppGenerator::finishGeneration()
if (!referencedType)
continue;
QString converter = converterObject(referencedType);
- QStringList cppSignature = pte->qualifiedCppName().split(QLatin1String("::"), QString::SkipEmptyParts);
+ QStringList cppSignature = pte->qualifiedCppName().split(QLatin1String("::"), Qt::SkipEmptyParts);
while (!cppSignature.isEmpty()) {
QString signature = cppSignature.join(QLatin1String("::"));
s << INDENT << "Shiboken::Conversions::registerConverterName(" << converter << ", \"" << signature << "\");\n";
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.h b/sources/shiboken2/generator/shiboken2/cppgenerator.h
index 4b7c80ee..aee1fb7d 100644
--- a/sources/shiboken2/generator/shiboken2/cppgenerator.h
+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.h
@@ -53,11 +53,12 @@ private:
void writeInitFunc(QTextStream &declStr, QTextStream &callStr,
const Indentor &indent, const QString &initFunctionName,
const TypeEntry *enclosingEntry = nullptr);
+ void writeCacheResetNative(QTextStream &s, const AbstractMetaClass *metaClass);
void writeConstructorNative(QTextStream &s, const AbstractMetaFunction *func);
void writeDestructorNative(QTextStream &s, const AbstractMetaClass *metaClass);
QString getVirtualFunctionReturnTypeName(const AbstractMetaFunction *func);
- void writeVirtualMethodNative(QTextStream &s, const AbstractMetaFunction *func);
+ void writeVirtualMethodNative(QTextStream &s, const AbstractMetaFunction *func, int cacheIndex);
void writeMetaObjectMethod(QTextStream &s, const AbstractMetaClass *metaClass);
void writeMetaCast(QTextStream &s, const AbstractMetaClass *metaClass);
diff --git a/sources/shiboken2/generator/shiboken2/headergenerator.cpp b/sources/shiboken2/generator/shiboken2/headergenerator.cpp
index a565659d..af56d944 100644
--- a/sources/shiboken2/generator/shiboken2/headergenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/headergenerator.cpp
@@ -139,10 +139,17 @@ void HeaderGenerator::generateClass(QTextStream &s, GeneratorContext &classConte
s << "\n{\npublic:\n";
const AbstractMetaFunctionList &funcs = filterFunctions(metaClass);
+ int maxOverrides = 0;
for (AbstractMetaFunction *func : funcs) {
- if ((func->attributes() & AbstractMetaAttributes::FinalCppMethod) == 0)
+ if ((func->attributes() & AbstractMetaAttributes::FinalCppMethod) == 0) {
writeFunction(s, func);
+ // PYSIDE-803: Build a boolean cache for unused overrides.
+ if (shouldWriteVirtualMethodNative(func))
+ maxOverrides++;
+ }
}
+ if (!maxOverrides)
+ maxOverrides = 1;
if (avoidProtectedHack() && metaClass->hasProtectedFields()) {
const AbstractMetaFieldList &fields = metaClass->fields();
@@ -182,6 +189,10 @@ void HeaderGenerator::generateClass(QTextStream &s, GeneratorContext &classConte
if (usePySideExtensions())
s << INDENT << "static void pysideInitQtMetaTypes();\n";
+ s << INDENT << "void resetPyMethodCache();\n";
+ s << "private:\n";
+ s << INDENT << "mutable bool m_PyMethodCache[" << maxOverrides << "];\n";
+
s << "};\n\n";
if (!innerHeaderGuard.isEmpty())
s << "# endif // SBK_" << innerHeaderGuard << "_H\n\n";
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index 9793998b..170cbd74 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -96,7 +96,7 @@ static QString resolveScopePrefix(const QStringList &scopeList, const QString &v
static inline QStringList splitClassScope(const AbstractMetaClass *scope)
{
- return scope->qualifiedCppName().split(QLatin1String("::"), QString::SkipEmptyParts);
+ return scope->qualifiedCppName().split(QLatin1String("::"), Qt::SkipEmptyParts);
}
static QString resolveScopePrefix(const AbstractMetaClass *scope, const QString &value)
@@ -322,6 +322,15 @@ bool ShibokenGenerator::shouldGenerateCppWrapper(const AbstractMetaClass *metaCl
return result;
}
+bool ShibokenGenerator::shouldWriteVirtualMethodNative(const AbstractMetaFunction *func)
+{
+ // PYSIDE-803: Extracted this because it is used multiple times.
+ const AbstractMetaClass *metaClass = func->ownerClass();
+ return (!avoidProtectedHack() || !metaClass->hasPrivateDestructor())
+ && ((func->isVirtual() || func->isAbstract())
+ && (func->attributes() & AbstractMetaAttributes::FinalCppMethod) == 0);
+}
+
void ShibokenGenerator::lookForEnumsInClassesNotToBeGenerated(AbstractMetaEnumList &enumList, const AbstractMetaClass *metaClass)
{
Q_ASSERT(metaClass);
@@ -355,6 +364,15 @@ QString ShibokenGenerator::wrapperName(const AbstractMetaType *metaType) const
return metaType->cppSignature();
}
+QString ShibokenGenerator::wrapperName(const TypeEntry *type) const
+{
+ QString name = type->name();
+ int pos = name.lastIndexOf(QLatin1String("::"));
+ if (pos >= 0)
+ name = name.remove(0, pos + 2);
+ return name + QLatin1String("Wrapper");
+}
+
QString ShibokenGenerator::fullPythonClassName(const AbstractMetaClass *metaClass)
{
QString fullClassName = metaClass->name();
@@ -2167,6 +2185,13 @@ bool ShibokenGenerator::injectedCodeUsesArgument(const AbstractMetaFunction *fun
return false;
}
+bool ShibokenGenerator::useOverrideCaching(const AbstractMetaClass *metaClass)
+{
+ return metaClass->isPolymorphic()
+ && !metaClass->typeEntry()->typeFlags().testFlag(ComplexTypeEntry::NoOverrideCaching);
+
+}
+
ShibokenGenerator::AttroCheck ShibokenGenerator::checkAttroFunctionNeeds(const AbstractMetaClass *metaClass) const
{
AttroCheck result;
@@ -2177,6 +2202,8 @@ ShibokenGenerator::AttroCheck ShibokenGenerator::checkAttroFunctionNeeds(const A
result |= AttroCheckFlag::GetattroOverloads;
if (usePySideExtensions() && metaClass->qualifiedCppName() == QLatin1String("QObject"))
result |= AttroCheckFlag::SetattroQObject;
+ if (useOverrideCaching(metaClass))
+ result |= AttroCheckFlag::SetattroMethodOverride;
}
return result;
}
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.h b/sources/shiboken2/generator/shiboken2/shibokengenerator.h
index 55622b7c..d0e9073c 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.h
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.h
@@ -72,6 +72,7 @@ public:
GetattroMask = 0x0F,
SetattroQObject = 0x10,
SetattroSmartPointer = 0x20,
+ SetattroMethodOverride = 0x40,
SetattroMask = 0xF0,
};
Q_DECLARE_FLAGS(AttroCheck, AttroCheckFlag);
@@ -193,6 +194,7 @@ protected:
/// Returns the top-most class that has multiple inheritance in the ancestry.
static const AbstractMetaClass *getMultipleInheritingClass(const AbstractMetaClass *metaClass);
+ static bool useOverrideCaching(const AbstractMetaClass *metaClass);
AttroCheck checkAttroFunctionNeeds(const AbstractMetaClass *metaClass) const;
/// Returns a list of methods of the given class where each one is part of a different overload with both static and non-static method.
@@ -212,11 +214,15 @@ protected:
/// Verifies if the class should have a C++ wrapper generated for it, instead of only a Python wrapper.
bool shouldGenerateCppWrapper(const AbstractMetaClass *metaClass) const;
+ /// Condition to call WriteVirtualMethodNative. Was extracted because also used to count these calls.
+ bool shouldWriteVirtualMethodNative(const AbstractMetaFunction *func);
+
/// Adds enums eligible for generation from classes/namespaces marked not to be generated.
static void lookForEnumsInClassesNotToBeGenerated(AbstractMetaEnumList &enumList, const AbstractMetaClass *metaClass);
QString wrapperName(const AbstractMetaClass *metaClass) const;
QString wrapperName(const AbstractMetaType *metaType) const;
+ QString wrapperName(const TypeEntry *type) const;
QString fullPythonClassName(const AbstractMetaClass *metaClass);
QString fullPythonFunctionName(const AbstractMetaFunction *func);
diff --git a/sources/shiboken2/libshiboken/bindingmanager.cpp b/sources/shiboken2/libshiboken/bindingmanager.cpp
index 725150e8..1f18ed60 100644
--- a/sources/shiboken2/libshiboken/bindingmanager.cpp
+++ b/sources/shiboken2/libshiboken/bindingmanager.cpp
@@ -37,6 +37,7 @@
**
****************************************************************************/
+#include "autodecref.h"
#include "basewrapper.h"
#include "basewrapper_p.h"
#include "bindingmanager.h"
@@ -288,7 +289,7 @@ PyObject *BindingManager::getOverride(const void *cptr, const char *methodName)
}
}
- PyObject *pyMethodName = Shiboken::String::fromCString(methodName);
+ Shiboken::AutoDecRef pyMethodName(Shiboken::String::fromCString(methodName));
PyObject *method = PyObject_GetAttr(reinterpret_cast<PyObject *>(wrapper), pyMethodName);
if (method && PyMethod_Check(method)
@@ -302,16 +303,13 @@ PyObject *BindingManager::getOverride(const void *cptr, const char *methodName)
auto *parent = reinterpret_cast<PyTypeObject *>(PyTuple_GET_ITEM(mro, i));
if (parent->tp_dict) {
defaultMethod = PyDict_GetItem(parent->tp_dict, pyMethodName);
- if (defaultMethod && PyMethod_GET_FUNCTION(method) != defaultMethod) {
- Py_DECREF(pyMethodName);
+ if (defaultMethod && PyMethod_GET_FUNCTION(method) != defaultMethod)
return method;
- }
}
}
}
Py_XDECREF(method);
- Py_DECREF(pyMethodName);
return nullptr;
}
diff --git a/sources/shiboken2/tests/py3kcompat.py b/sources/shiboken2/tests/py3kcompat.py
index 06520899..357ea4fb 100644
--- a/sources/shiboken2/tests/py3kcompat.py
+++ b/sources/shiboken2/tests/py3kcompat.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
-#
+
#############################################################################
##
-## Copyright (C) 2016 The Qt Company Ltd.
+## 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.
@@ -28,21 +28,39 @@
##
#############################################################################
+# Copy of ../../pyside2/tests/util/py3kcompat.py
+
import sys
IS_PY3K = sys.version_info[0] == 3
if IS_PY3K:
- def unicode(s):
- return s
-
def b(s):
+ if type(s) == bytes:
+ return s
return bytes(s, "UTF8")
+ def buffer_(s):
+ if s == None:
+ return None
+ elif type(s) == str:
+ return bytes(s, "UTF8")
+ elif type(s) == bytes:
+ return s
+ else:
+ memoryview(s)
+
def l(n):
return n
+ def unicode_(s):
+ return s
+
+ unicode = str
+ unichr = chr
long = int
+ unichr = chr
+ buffer = buffer_
else:
def b(s):
return s
@@ -50,5 +68,15 @@ else:
def l(n):
return long(n)
+ def unicode_(s):
+ if type(s) == str:
+ import codecs
+ c = codecs.lookup('utf-8')
+ s2 = c.decode(s, 'ignore')
+ return s2[0]
+ return u'%s' % s
+
unicode = unicode
+ unichr = unichr
long = long
+ buffer = buffer
diff --git a/sources/shiboken2/tests/shiboken_paths.py b/sources/shiboken2/tests/shiboken_paths.py
index cf366a13..e5a8f292 100644
--- a/sources/shiboken2/tests/shiboken_paths.py
+++ b/sources/shiboken2/tests/shiboken_paths.py
@@ -31,6 +31,20 @@ import os
import sys
+def get_dir_env_var(var_name):
+ """Return a directory set by an environment variable"""
+ result = os.environ.get(var_name)
+ if not result:
+ raise ValueError('{} is not set!'.format(var_name))
+ if not os.path.isdir(result):
+ raise ValueError('{} is not a directory!'.format(result))
+ return result
+
+
+def get_build_dir():
+ return get_dir_env_var('BUILD_DIR')
+
+
def _prepend_path_var(var_name, paths):
"""Prepend additional paths to a path environment variable
like PATH, LD_LIBRARY_PATH"""
@@ -41,29 +55,15 @@ def _prepend_path_var(var_name, paths):
os.environ[var_name] = new_paths
-def init_paths():
- """Sets the correct import paths (Python modules and C++ library
- paths) for testing shiboken depending on a single
- environment variable BUILD_DIR pointing to the build
- directory."""
- VAR_NAME = 'BUILD_DIR'
- build_dir = os.environ.get(VAR_NAME)
- if not build_dir:
- raise ValueError('{} is not set!'.format(VAR_NAME))
- if not os.path.isdir(build_dir):
- raise ValueError('{} is not a directory!'.format(build_dir))
- src_dir = os.path.dirname(os.path.abspath(__file__))
- if src_dir not in sys.path: # Might be present due to import of this file
- sys.path.append(src_dir) # For py3kcompat
- shiboken_dir = os.path.join(build_dir, 'shiboken2')
- sys.path.append(os.path.join(shiboken_dir, 'shibokenmodule'))
- lib_dirs = [os.path.join(shiboken_dir, 'libshiboken')]
- shiboken_test_dir = os.path.join(shiboken_dir, 'tests')
- for module in ['minimal', 'sample', 'smart', 'other']:
- module_dir = os.path.join(shiboken_test_dir, module + 'binding')
- sys.path.append(module_dir)
- lib_dir = os.path.join(shiboken_test_dir, 'lib' + module)
- lib_dirs.append(lib_dir)
+def add_python_dirs(python_dirs):
+ """Add directories to the Python path unless present."""
+ for python_dir in python_dirs:
+ if python_dir not in sys.path:
+ sys.path.append(python_dir)
+
+
+def add_lib_dirs(lib_dirs):
+ """Add directories to the platform's library path."""
if sys.platform == 'win32':
if sys.version_info >= (3, 8, 0):
for lib_dir in lib_dirs:
@@ -72,3 +72,35 @@ def init_paths():
_prepend_path_var('PATH', lib_dirs)
else:
_prepend_path_var('LD_LIBRARY_PATH', lib_dirs)
+
+
+def shiboken_paths(include_shiboken_tests=False):
+ """Return a tuple of python directories/lib directories to be set for
+ using the shiboken2 module from the build directory or running the
+ shiboken tests depending on a single environment variable BUILD_DIR
+ pointing to the build directory."""
+ src_dir = os.path.dirname(os.path.abspath(__file__))
+ python_dirs = []
+ if include_shiboken_tests:
+ python_dirs.append(src_dir) # For py3kcompat
+ shiboken_dir = os.path.join(get_build_dir(), 'shiboken2')
+ python_dirs.append(os.path.join(shiboken_dir, 'shibokenmodule'))
+ lib_dirs = [os.path.join(shiboken_dir, 'libshiboken')]
+ if include_shiboken_tests:
+ shiboken_test_dir = os.path.join(shiboken_dir, 'tests')
+ for module in ['minimal', 'sample', 'smart', 'other']:
+ module_dir = os.path.join(shiboken_test_dir, module + 'binding')
+ python_dirs.append(module_dir)
+ lib_dir = os.path.join(shiboken_test_dir, 'lib' + module)
+ lib_dirs.append(lib_dir)
+ return (python_dirs, lib_dirs)
+
+
+def init_paths():
+ """Sets the correct import paths (Python modules and C++ library
+ paths) for testing shiboken depending on a single
+ environment variable BUILD_DIR pointing to the build
+ directory."""
+ paths = shiboken_paths(True)
+ add_python_dirs(paths[0])
+ add_lib_dirs(paths[1])
diff --git a/tools/create_changelog.py b/tools/create_changelog.py
index d28af1a7..7599cc6b 100644
--- a/tools/create_changelog.py
+++ b/tools/create_changelog.py
@@ -41,9 +41,9 @@ import re
import sys
from argparse import ArgumentParser, Namespace, RawTextHelpFormatter
from subprocess import check_output, Popen, PIPE
-from typing import Dict, List
+from typing import Dict, List, Tuple
-content = """Qt for Python @VERSION is a @TYPE release.
+content_header = """Qt for Python @VERSION is a @TYPE release.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
@@ -61,14 +61,11 @@ information about a particular change.
****************************************************************************
* PySide2 *
****************************************************************************
+"""
-@PYSIDE
-
-****************************************************************************
+shiboken_header = """****************************************************************************
* Shiboken2 *
****************************************************************************
-
-@SHIBOKEN
"""
@@ -143,20 +140,22 @@ def get_commit_content(sha: str) -> str:
print(err, file=sys.stderr)
return out.decode("utf-8")
-
-def git_command(versions: List[str], pattern: str):
+def git_get_sha1s(versions: List[str], pattern: str):
+ """Return a list of SHA1s matching a pattern"""
command = "git rev-list --reverse --grep '^{}'".format(pattern)
command += " {}..{}".format(versions[0], versions[1])
command += " | git cat-file --batch"
command += " | grep -o -E \"^[0-9a-f]{40}\""
- task_number_re = re.compile(r'^.*-(\d+)\s*$')
print("{}: {}".format(git_command.__name__, command), file=sys.stderr)
out_sha1, err = Popen(command, stdout=PIPE, shell=True).communicate()
if err:
print(err, file=sys.stderr)
- sha1_list = [s.decode("utf-8") for s in out_sha1.splitlines()]
+ return [s.decode("utf-8") for s in out_sha1.splitlines()]
+
- for sha in sha1_list:
+def git_command(versions: List[str], pattern: str):
+ task_number_re = re.compile(r'^.*-(\d+)\s*$')
+ for sha in git_get_sha1s(versions, pattern):
content = get_commit_content(sha).splitlines()
# First line is title
title = content[0]
@@ -190,11 +189,43 @@ def create_task_log(versions: List[str]) -> None:
git_command(versions, "Task-number: ")
+def extract_change_log(commit_message: List[str]) -> Tuple[str, List[str]]:
+ """Extract a tuple of (component, change log lines) from a commit message
+ of the form [ChangeLog][shiboken2] description..."""
+ result = []
+ component = 'pyside'
+ within_changelog = False
+ for line in commit_message:
+ if within_changelog:
+ if line:
+ result.append(' ' + line.strip())
+ else:
+ break
+ else:
+ if line.startswith('[ChangeLog]'):
+ log_line = line[11:]
+ if log_line.startswith('['):
+ end = log_line.find(']')
+ if end > 0:
+ component = log_line[1:end]
+ log_line = log_line[end + 1:]
+ result.append(' * ' + log_line.strip())
+ within_changelog = True
+ return (component, result)
+
+
+def create_change_log(versions: List[str]) -> None:
+ for sha in git_get_sha1s(versions, r"\[ChangeLog\]"):
+ change_log = extract_change_log(get_commit_content(sha).splitlines())
+ if change_log[0].startswith('shiboken'):
+ shiboken2_changelogs.extend(change_log[1])
+ else:
+ pyside2_changelogs.extend(change_log[1])
+
+
def gen_list(d: Dict[str, Dict[str, str]]) -> str:
- if d:
- return "".join(" - [{}] {}\n".format(v["task"], v["title"])
- for _, v in d.items())
- return " - No changes"
+ return "".join(" - [{}] {}\n".format(v["task"], v["title"])
+ for _, v in d.items())
def sort_dict(d: Dict[str, Dict[str, str]]) -> Dict[str, Dict[str, str]]:
@@ -206,6 +237,8 @@ if __name__ == "__main__":
args = parse_options()
pyside2_commits: Dict[str, Dict[str, str]] = {}
shiboken2_commits: Dict[str, Dict[str, str]] = {}
+ pyside2_changelogs: List[str] = []
+ shiboken2_changelogs: List[str] = []
# Getting commits information
directory = args.directory if args.directory else "."
@@ -214,14 +247,21 @@ if __name__ == "__main__":
if check_tag(versions[0]) and check_tag(versions[1]):
create_fixes_log(versions)
create_task_log(versions)
+ create_change_log(versions)
# Sort commits
pyside2_commits = sort_dict(pyside2_commits)
shiboken2_commits = sort_dict(shiboken2_commits)
# Generate message
- print(content
- .replace("@VERSION", args.release)
- .replace("@TYPE", args.type)
- .replace("@PYSIDE", gen_list(pyside2_commits))
- .replace("@SHIBOKEN", gen_list(shiboken2_commits)))
+ print(content_header.replace("@VERSION", args.release).
+ replace("@TYPE", args.type))
+ print('\n'.join(pyside2_changelogs))
+ print(gen_list(pyside2_commits))
+ if not pyside2_changelogs and not pyside2_commits:
+ print(" - No changes")
+ print(shiboken_header)
+ print('\n'.join(shiboken2_changelogs))
+ print(gen_list(shiboken2_commits))
+ if not shiboken2_changelogs and not shiboken2_commits:
+ print(" - No changes")