Commit d3002ce3 authored by David Fairbrother's avatar David Fairbrother Committed by Peterson, Peter
Browse files

Add missing pytest files to associated CMakeLists

Adds missing Pytest files to their respective CMakelists.

In the case of system tests we simply remove the unit test marker, as they inherit from
mantid.systemtest and should not be using unittest directly.
parent e89a2116
# mantid.dataobjects tests
set(TEST_PY_FILES EventListTest.py Workspace2DPickleTest.py)
set(TEST_PY_FILES EventListTest.py SpecialWorkspace2DTest.py Workspace2DPickleTest.py)
check_tests_valid(${CMAKE_CURRENT_SOURCE_DIR} ${TEST_PY_FILES})
......
......@@ -14,6 +14,8 @@ set(TEST_PY_FILES
CalculateFluxTest.py
CalculateSampleTransmissionTest.py
CheckForSampleLogsTest.py
CleanFileCacheTest.py
ClipPeaksTest.py
ConjoinSpectraTest.py
ConvertQtoHKLMDHistoTest.py
ConvertWANDSCDtoQTest.py
......@@ -23,6 +25,7 @@ set(TEST_PY_FILES
CorrectLogTimesTest.py
CreateLeBailFitInputTest.py
CorrectTOFTest.py
CreateCacheFilenameTest.py
CreateWorkspaceTest.py
CropWorkspaceForMDNormTest.py
CylinderPaalmanPingsCorrection2Test.py
......@@ -34,6 +37,7 @@ set(TEST_PY_FILES
DSFinterpTest.py
EnggCalibrateFullTest.py
EnggCalibrateTest.py
EnggEstimateFocussedBackgroundTest.py
EnggFitTOFFromPeaksTest.py
EnggFitPeaksTest.py
EnggFocusTest.py
......@@ -44,6 +48,8 @@ set(TEST_PY_FILES
ExportSpectraMaskTest.py
FilterLogByTimeTest.py
FitGaussianTest.py
FindGoniometerFromUBTest.py
FindGlobalBMatrixTest.py
FitIncidentSpectrumTest.py
FractionalIndexingTest.py
GenerateLogbookTest.py
......@@ -56,6 +62,7 @@ set(TEST_PY_FILES
HB3APredictPeaksTest.py
HFIRCalculateGoniometerTest.py
HFIRSANS2WavelengthTest.py
IndexPeaksTest.py
IndirectTransmissionTest.py
IndexSatellitePeaksTest.py
LeadPressureCalcTest.py
......
......@@ -44,6 +44,7 @@ set(TEST_PY_FILES
D7YIGPositionCalibrationTest.py
D7AbsoluteCrossSectionsTest.py
LoadWANDTest.py
MatchAndMergeWorkspacesTest.py
MDNormSCDPreprocessIncoherentTest.py
MolDynTest.py
MSDFitTest.py
......
......@@ -71,7 +71,3 @@ class SANSBeamCentreFinderTest(unittest.TestCase):
expected_mismatched = (y_data_1[1] ** 2) + (y_data_2[1] ** 2)
squared_expected = expected_matched + expected_mismatched
self.assertEqual(squared_expected, result.total_residual)
if __name__ == '__main__':
unittest.main()
......@@ -5,6 +5,7 @@ set(TEST_PY_FILES
AFM_ZFTest.py
AttributeTest.py
BesselTest.py
ChudleyElliotTest.py
CombGaussLorentzKTTest.py
DampedBesselTest.py
CompositePCRmagnetTest.py
......@@ -31,6 +32,8 @@ set(TEST_PY_FILES
PCRmagnetRedfieldTest.py
PCRmagnetfnormTest.py
PEARLTransVoigtTest.py
PrimStretchedExpFTTest.py
RedfieldTest.py
RFresonanceTest.py
SpinGlassTest.py
StandardSCTest.py
......
set(TEST_FILES
CalculateSlitsTest.h
ConvertToReflectometryQTest.h
CreateTransmissionWorkspace2Test.h
CreateTransmissionWorkspaceAuto2Test.h
FindReflectometryLines2Test.h
NRCalculateSlitResolutionTest.h
ReflectometryBeamStatisticsTest.h
ReflectometryMomentumTransferTest.h
ReflectometryReductionOne2Test.h
ReflectometryReductionOneAuto2Test.h
ReflectometryReductionOneAuto3Test.h
ReflectometryTransformKiKfTest.h
ReflectometryTransformPTest.h
ReflectometryTransformQxQzTest.h
ReflectometrySumInQTest.h
SpecularReflectionCalculateTheta2Test.h
SpecularReflectionCalculateThetaTest.h
SpecularReflectionPositionCorrect2Test.h
SpecularReflectionPositionCorrectTest.h
)
set(TEST_PY_FILES ReflectometryBackgroundSubtractionTest.py ReflectometryReductionOne2Test.py)
if(CXXTEST_FOUND)
include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR})
......
set(TEST_FILES
AlignAndFocusPowderTest.h
ExtractQENSMembersTest.h
IMuonAsymmetryCalculatorTest.h
LoadEventAndCompressTest.h
MuonProcessTest.h
ProcessIndirectFitParametersTest.h
SANSSolidAngleCorrectionTest.h
SofTwoThetaTOFTest.h
StepScanTest.h
)
set(TEST_PY_FILES EQSANSQ2DTest.py SANSBeamFluxCorrectionTest.py)
if(CXXTEST_FOUND)
include_directories(SYSTEM ${CXXTEST_INCLUDE_DIR})
......
......@@ -5,7 +5,6 @@
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from mantid.simpleapi import FindSatellitePeaks, Load
import unittest
import systemtesting
......@@ -64,7 +63,3 @@ class FindSatellitePeaksTestAutoFindQ(systemtesting.MantidSystemTest):
def validate(self):
return self._satellites_refined.name(), 'refine_satellites_auto_q_test_04012021.nxs'
if __name__ == "__main__":
unittest.main()
......@@ -270,7 +270,3 @@ class SANSLOQCan2DReloadWorkspace(systemtesting.MantidSystemTest):
self.disableChecking.append('Axes')
# the change in number is because the run number reported from 99630 is 53615
return '53615main_2D_2.2_10.0','SANSLOQCan2D.nxs'
if __name__ == "__main__":
unittest.main()
......@@ -178,7 +178,3 @@ class SANS2DWaveloopsReloadWorkspace(systemtesting.MantidSystemTest):
# testing one of the workspaces that is produced, best not to choose the
# first one in produced by the loop as this is the least error prone
return '992rear_1D_7.0_11.0','SANS2DWaveloops.nxs'
if __name__ == "__main__":
unittest.main()
......@@ -315,7 +315,3 @@ class SANSBatchReductionRunnerTest(systemtesting.MantidSystemTest):
def validate(self):
return self._success
if __name__ == '__main__':
unittest.main()
......@@ -209,7 +209,3 @@ class SANSBeamCentreCoreRunnerTest(systemtesting.MantidSystemTest):
def validate(self):
return self._success
if __name__ == '__main__':
unittest.main()
......@@ -642,7 +642,3 @@ class DarkRunSubtractionTestSystemTest(systemtesting.MantidSystemTest):
def validate(self):
return self._success
if __name__ == '__main__':
unittest.main()
......@@ -168,7 +168,3 @@ class SANSDiagnosticPageRunnerTest(systemtesting.MantidSystemTest):
def validate(self):
return self._success
if __name__ == '__main__':
unittest.main()
......@@ -514,7 +514,3 @@ class SANSLoadDataRunnerTest(systemtesting.MantidSystemTest):
def validate(self):
return self._success
if __name__ == '__main__':
unittest.main()
......@@ -249,7 +249,3 @@ class LoadAddedEventDataSampleTestSystemTest(systemtesting.MantidSystemTest):
def validate(self):
self.disableChecking.append('Instrument')
return self._success
if __name__ == '__main__':
unittest.main()
......@@ -272,7 +272,3 @@ class SANSReductionCoreRunnerTest(systemtesting.MantidSystemTest):
def validate(self):
return self._success
if __name__ == '__main__':
unittest.main()
......@@ -225,7 +225,3 @@ class SANSSaveRunnerTest(systemtesting.MantidSystemTest):
def validate(self):
return self._success
if __name__ == '__main__':
unittest.main()
......@@ -731,7 +731,3 @@ class SANSReductionRunnerTest(systemtesting.MantidSystemTest):
def validate(self):
return self._success
if __name__ == '__main__':
unittest.main()
......@@ -133,7 +133,3 @@ class PowderReduceP2DTest(systemtesting.MantidSystemTest):
def _outputFile(self):
return 'PowderReduceP2D_Test'
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment