diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Common/DecoderTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Common/DecoderTest.h index a35b7d10c6a00a637f65e5a2df4ba90878defe7c..a9e6ec8193db7ca1e553454f7c0131fb18ee3775 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Common/DecoderTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Common/DecoderTest.h @@ -11,7 +11,7 @@ #include "../../../ISISReflectometry/GUI/Common/Decoder.h" #include "../ReflMockObjects.h" #include "CoderCommonTester.h" -#include "MantidAPI/FrameworkManager.h" +#include "MantidPythonInterface/core/WrapPython.h" #include "MantidQtWidgets/Common/QtJSONUtils.h" #include <cxxtest/TestSuite.h> @@ -168,7 +168,10 @@ public: static DecoderTest *createSuite() { return new DecoderTest(); } static void destroySuite(DecoderTest *suite) { delete suite; } - void setUp() override { Mantid::API::FrameworkManager::Instance(); } + DecoderTest() { + PyRun_SimpleString("import mantid.api as api\n" + "api.FrameworkManager.Instance()"); + } void test_decode() { CoderCommonTester tester; diff --git a/qt/scientific_interfaces/test/ISISReflectometry/Common/EncoderTest.h b/qt/scientific_interfaces/test/ISISReflectometry/Common/EncoderTest.h index 7dde60c8ebdd19172024bf3d82d605faa4b60ad6..d22a4f438a6e4ecf8fd44ad07c4942f2b18e4712 100644 --- a/qt/scientific_interfaces/test/ISISReflectometry/Common/EncoderTest.h +++ b/qt/scientific_interfaces/test/ISISReflectometry/Common/EncoderTest.h @@ -11,7 +11,7 @@ #include "../../../ISISReflectometry/GUI/Common/Encoder.h" #include "../ReflMockObjects.h" #include "CoderCommonTester.h" -#include "MantidAPI/FrameworkManager.h" +#include "MantidPythonInterface/core/WrapPython.h" #include <cxxtest/TestSuite.h> @@ -27,7 +27,10 @@ public: static EncoderTest *createSuite() { return new EncoderTest(); } static void destroySuite(EncoderTest *suite) { delete suite; } - void setUp() override { Mantid::API::FrameworkManager::Instance(); } + EncoderTest() { + PyRun_SimpleString("import mantid.api as api\n" + "api.FrameworkManager.Instance()"); + } void test_encoder() { CoderCommonTester tester;