Skip to content
Snippets Groups Projects
Commit e0228e2b authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Re-enable python tests

parent 82dae243
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ if ( CXXTEST_FOUND )
include_directories ( ../../../Framework/TestHelpers/inc
../../../Framework/DataObjects/inc )
# This variable is used within the cxxtest_add_test macro to build these helper classes into the test executable.
# It will go out of scope at the end of this file so doesn't need un-setting
set ( TESTHELPER_SRCS ../../../Framework/TestHelpers/src/TearDownWorld.cpp
......@@ -11,9 +11,9 @@ if ( CXXTEST_FOUND )
../../../Framework/TestHelpers/src/InstrumentCreationHelper.cpp
../../../Framework/TestHelpers/src/WorkspaceCreationHelper.cpp
)
cxxtest_add_test ( MantidQtAPITest ${TEST_FILES} )
target_link_libraries( MantidQtAPITest LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME}
target_link_libraries( MantidQtAPITest LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME}
MantidQtAPI
API
DataObjects
......@@ -27,7 +27,11 @@ if ( CXXTEST_FOUND )
${GMOCK_LIBRARIES}
${GTEST_LIBRARIES} )
add_dependencies( GUITests MantidQtAPITest )
# Add to the 'UnitTests' group in VS
set_property( TARGET MantidQtAPITest PROPERTY FOLDER "UnitTests" )
endif ()
if ( PYUNITTEST_FOUND )
pyunittest_add_test (${CMAKE_CURRENT_SOURCE_DIR} MantidQtAPITest ${TEST_PY_FILES} )
endif ()
......@@ -14,7 +14,7 @@ class MWRunFilesTest(unittest.TestCase):
python interpreter"""
def setUp(self):
self.mwrunfiles = mantidqtpython.MantidQt.MantidWidgets.MWRunFiles()
self.mwrunfiles = mantidqtpython.MantidQt.API.MWRunFiles()
def tearDown(self):
""" Close the created widget """
......@@ -28,7 +28,7 @@ class MWRunFilesTest(unittest.TestCase):
app.exec_()
def test_creation(self):
self.assertTrue(isinstance(self.mwrunfiles,mantidqtpython.MantidQt.MantidWidgets.MWRunFiles), "Created object is not an instance of MWRunFiles")
self.assertTrue(isinstance(self.mwrunfiles,mantidqtpython.MantidQt.API.MWRunFiles), "Created object is not an instance of MWRunFiles")
def test_lineedit_text(self):
self.assertEqual(len(self.mwrunfiles.text()), 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment