From 9c78178561c7cf95d32f713cedb3742deb80db6d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 29 May 2020 17:31:58 +0200 Subject: [PATCH] Fix running automated tests from source with different SIP version This prevents the PyCapsule_GetPointer error when running the tests for this plug-in. Done during Turbo Testing and Tooling. --- plugins/PostProcessingPlugin/__init__.py | 9 ++++++++- .../tests/TestPostProcessingPlugin.py | 2 ++ plugins/PostProcessingPlugin/tests/__init__.py | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/__init__.py b/plugins/PostProcessingPlugin/__init__.py index 8064d1132a..6ddecfac69 100644 --- a/plugins/PostProcessingPlugin/__init__.py +++ b/plugins/PostProcessingPlugin/__init__.py @@ -1,6 +1,13 @@ -# Copyright (c) 2015 Jaime van Kessel, Ultimaker B.V. +# Copyright (c) 2020 Jaime van Kessel, Ultimaker B.V. # The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. +# Workaround for a race condition on certain systems where there +# is a race condition between Arcus and PyQt. Importing Arcus +# first seems to prevent Sip from going into a state where it +# tries to create PyQt objects on a non-main thread. +import Arcus # @UnusedImport +import Savitar # @UnusedImport + from . import PostProcessingPlugin diff --git a/plugins/PostProcessingPlugin/tests/TestPostProcessingPlugin.py b/plugins/PostProcessingPlugin/tests/TestPostProcessingPlugin.py index 360ea344ca..70fda32692 100644 --- a/plugins/PostProcessingPlugin/tests/TestPostProcessingPlugin.py +++ b/plugins/PostProcessingPlugin/tests/TestPostProcessingPlugin.py @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. import os import sys diff --git a/plugins/PostProcessingPlugin/tests/__init__.py b/plugins/PostProcessingPlugin/tests/__init__.py index e69de29bb2..a29c371409 100644 --- a/plugins/PostProcessingPlugin/tests/__init__.py +++ b/plugins/PostProcessingPlugin/tests/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) 2020 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. \ No newline at end of file