Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
Merge remote branch 'origin/feature/8374_clean_up_tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellTaylor committed Nov 18, 2013
2 parents 0e910f1 + 3b7bcaa commit 731780e
Show file tree
Hide file tree
Showing 16 changed files with 375 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def _skip_test():
return True

class PG3Calibration(stresstesting.MantidStressTest):
def cleanup(self):
os.remove(self.saved_cal_file)

def skipTests(self):
return _skip_test()
Expand Down Expand Up @@ -56,6 +58,8 @@ def validate(self):
return ('PG3_2538_offsets','PG3_2538_golden_offsets')

class PG3CCCalibration(stresstesting.MantidStressTest):
def cleanup(self):
os.remove(self.saved_cal_file)

def skipTests(self):
return _skip_test()
Expand Down
12 changes: 12 additions & 0 deletions SystemTests/AnalysisTests/Diffraction_Workflow_Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@
import stresstesting
import numpy
from mantid.simpleapi import *
from mantid.api import FileFinder

import os

class Diffraction_Workflow_Test(stresstesting.MantidStressTest):

def cleanup(self):
Files = ["TOPAZ_3132.hkl",
"TOPAZ_3132FFT.hkl"]
for file in Files:
absfile = FileFinder.getFullPath(file)
if os.path.exists(absfile):
os.remove(absfile)
return True

def requiredMemoryMB(self):
""" Require about 4GB free """
Expand Down
18 changes: 18 additions & 0 deletions SystemTests/AnalysisTests/EQSANSBeamCenterAPIv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@
from reduction_workflow.instruments.sans.sns_command_interface import *
from mantid.api import *

import os

def do_cleanup():
absfile = FileFinder.getFullPath("EQSANS_4061_event_reduction.log")
if os.path.exists(absfile):
os.remove(absfile)
return True

class EQSANSBeamCenter(stresstesting.MantidStressTest):

def cleanup(self):
do_cleanup()
return True

def runTest(self):
config = ConfigService.Instance()
config["facilityName"]='SNS'
Expand Down Expand Up @@ -36,6 +49,11 @@ def validate(self):
return "EQSANS_4061_event_frame2_Iq", 'EQSANSBeamCenter.nxs'

class EQSANSBeamCenterEvent(EQSANSBeamCenter):

def cleanup(self):
do_cleanup()
return True

def runTest(self):
config = ConfigService.Instance()
config["facilityName"]='SNS'
Expand Down
9 changes: 9 additions & 0 deletions SystemTests/AnalysisTests/EQSANSDarkCurrentAPIv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
from reduction_workflow.instruments.sans.sns_command_interface import *
from mantid.api import *

import os

class EQSANSDarkCurrent(stresstesting.MantidStressTest):

def cleanup(self):
absfile = FileFinder.getFullPath("EQSANS_1466_event_reduction.log")
if os.path.exists(absfile):
os.remove(absfile)
return True

"""
Analysis Tests for EQSANS
Testing that the I(Q) output of is correct
Expand Down
10 changes: 10 additions & 0 deletions SystemTests/AnalysisTests/EQSANSEffAPIv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
import mantid
from mantid.simpleapi import *
from reduction_workflow.instruments.sans.sns_command_interface import *
from mantid.api import FileFinder

import os

class EQSANSEff(stresstesting.MantidStressTest):

def cleanup(self):
absfile = FileFinder.getFullPath("EQSANS_1466_event_reduction.log")
if os.path.exists(absfile):
os.remove(absfile)
return True

def runTest(self):
"""
System test for sensitivity correction
Expand Down
32 changes: 32 additions & 0 deletions SystemTests/AnalysisTests/EQSANSIQOutputAPIv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,24 @@
import mantid
from mantid.simpleapi import *
from reduction_workflow.instruments.sans.sns_command_interface import *
from mantid.api import *

import os

def do_cleanup():
Files = ["EQSANS_4061_event_reduction.log",
"EQSANS_1466_event_reduction.log"]
for file in Files:
absfile = FileFinder.getFullPath(file)
if os.path.exists(absfile):
os.remove(absfile)
return True

class EQSANSIQOutput(stresstesting.MantidStressTest):

def cleanup(self):
do_cleanup()
return True
"""
Analysis Tests for EQSANS
Testing that the I(Q) output of is correct
Expand Down Expand Up @@ -43,6 +59,10 @@ def validate(self):
return "EQSANS_1466_event_Iq", 'EQSANSIQOutput.nxs'

class EQSANSBeamMonitor(stresstesting.MantidStressTest):

def cleanup(self):
do_cleanup()
return True
"""
Analysis Tests for EQSANS
Testing that the I(Q) output of is correct
Expand All @@ -69,6 +89,10 @@ def validate(self):
return "EQSANS_1466_event_Iq", 'EQSANSBeamMonitor.nxs'

class EQSANSDQPositiveOutput(stresstesting.MantidStressTest):

def cleanup(self):
do_cleanup()
return True
"""
Analysis Tests for EQSANS
Testing that the Q resolution output of is correct
Expand Down Expand Up @@ -102,6 +126,10 @@ def validate(self):
return True

class EQSANSDQOutput(stresstesting.MantidStressTest):

def cleanup(self):
do_cleanup()
return True
"""
Analysis Tests for EQSANS
Testing that the Q resolution output of is correct
Expand Down Expand Up @@ -164,6 +192,10 @@ def validate(self):
return output

class EQSANSDQOutput_FS(stresstesting.MantidStressTest):

def cleanup(self):
do_cleanup()
return True
"""
Analysis Tests for EQSANS
Testing that the Q resolution output of is correct
Expand Down
10 changes: 10 additions & 0 deletions SystemTests/AnalysisTests/EQSANSProcessedEffAPIv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
import mantid
from mantid.simpleapi import *
from reduction_workflow.instruments.sans.sns_command_interface import *
from mantid.api import FileFinder

import os

class EQSANSProcessedEff(stresstesting.MantidStressTest):

def cleanup(self):
absfile = FileFinder.getFullPath("EQSANS_1466_event_reduction.log")
if os.path.exists(absfile):
os.remove(absfile)
return True

def runTest(self):
"""
System test for sensitivity correction
Expand Down
17 changes: 17 additions & 0 deletions SystemTests/AnalysisTests/EQSANSSolidAPIv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@
from reduction_workflow.instruments.sans.sns_command_interface import *
from mantid.api import *

import os

def do_cleanup():
absfile = FileFinder.getFullPath("EQSANS_1466_event_reduction.log")
if os.path.exists(absfile):
os.remove(absfile)
print "cleaned"
return True

class EQSANSSolid(stresstesting.MantidStressTest):

def cleanup(self):
do_cleanup()
return True
"""
Analysis Tests for EQSANS
Testing that the I(Q) output of is correct
Expand Down Expand Up @@ -43,6 +56,10 @@ def validate(self):
return "EQSANS_1466_event_Iq", 'EQSANSSolid.nxs'

class EQSANSSolidEvent(EQSANSSolid):

def cleanup(self):
do_cleanup()
return True
"""
Analysis Tests for EQSANS
Testing that the I(Q) output of is correct
Expand Down
45 changes: 42 additions & 3 deletions SystemTests/AnalysisTests/EQSANSTransAPIv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,23 @@
from reduction_workflow.instruments.sans.sns_command_interface import *
from mantid.api import *

import os

def do_cleanup():
Files = ["EQSANS_4061_event_reduction.log",
"EQSANS_1466_event_reduction.log"]
for file in Files:
absfile = FileFinder.getFullPath(file)
if os.path.exists(absfile):
os.remove(absfile)
return True

class EQSANSTransmission(stresstesting.MantidStressTest):

def cleanup(self):
do_cleanup()
return True

def runTest(self):
config = ConfigService.Instance()
config["facilityName"]='SNS'
Expand Down Expand Up @@ -34,7 +50,12 @@ def validate(self):
self.disableChecking.append('Axes')
return "EQSANS_1466_event_Iq", 'EQSANSTrans.nxs'

class EQSANSTransmissionEvent(EQSANSTransmission):
class EQSANSTransmissionEvent(EQSANSTransmission):

def cleanup(self):
do_cleanup()
return True

def runTest(self):
config = ConfigService.Instance()
config["facilityName"]='SNS'
Expand Down Expand Up @@ -65,6 +86,11 @@ def validate(self):


class EQSANSTransmissionDC(stresstesting.MantidStressTest):

def cleanup(self):
do_cleanup()
return True

def runTest(self):
"""
Check that EQSANSTofStructure returns the correct workspace
Expand Down Expand Up @@ -98,6 +124,11 @@ def validate(self):
return "EQSANS_1466_event_Iq", 'EQSANSTransmissionDC.nxs'

class EQSANSTransmissionCompatibility(EQSANSTransmission):

def cleanup(self):
do_cleanup()
return True

"""
Analysis Tests for EQSANS
Check that the transmission correction can be applied if the
Expand Down Expand Up @@ -133,7 +164,11 @@ def validate(self):
return "EQSANS_1466_event_Iq", 'EQSANSTransmissionCompatibility.nxs'

class EQSANSTransmissionFS(stresstesting.MantidStressTest):


def cleanup(self):
do_cleanup()
return True

def runTest(self):
"""
Check that EQSANSTofStructure returns the correct workspace
Expand Down Expand Up @@ -161,7 +196,11 @@ def validate(self):
return "EQSANS_4061_event_frame1_Iq", 'EQSANSTransmissionFS.nxs'

class EQSANSDirectTransFS(stresstesting.MantidStressTest):


def cleanup(self):
do_cleanup()
return True

def runTest(self):
"""
Check that EQSANSTofStructure returns the correct workspace
Expand Down

0 comments on commit 731780e

Please sign in to comment.