Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
e13d56f9
Commit
e13d56f9
authored
7 years ago
by
Elliot Oram
Browse files
Options
Downloads
Patches
Plain Diff
Update Polaris system tests to use Mantid sytle validate
Refs #21229
parent
21416b71
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py
+4
-29
4 additions, 29 deletions
Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py
with
4 additions
and
29 deletions
Testing/SystemTests/tests/analysis/ISIS_PowderPolarisTest.py
+
4
−
29
View file @
e13d56f9
...
@@ -53,7 +53,9 @@ class CreateVanadiumTest(stresstesting.MantidStressTest):
...
@@ -53,7 +53,9 @@ class CreateVanadiumTest(stresstesting.MantidStressTest):
self
.
calibration_results
=
run_vanadium_calibration
()
self
.
calibration_results
=
run_vanadium_calibration
()
def
validate
(
self
):
def
validate
(
self
):
return
calibration_validator
(
self
.
calibration_results
)
splined_ws
,
unsplined_ws
=
self
.
calibration_results
return
unsplined_ws
.
getName
(),
"
ISIS_Powder-POLARIS00098533_unsplined.nxs
"
,
\
splined_ws
.
getName
(),
"
ISIS_Powder-POLARIS00098533_splined.nxs
"
def
cleanup
(
self
):
def
cleanup
(
self
):
try
:
try
:
...
@@ -78,7 +80,7 @@ class FocusTest(stresstesting.MantidStressTest):
...
@@ -78,7 +80,7 @@ class FocusTest(stresstesting.MantidStressTest):
self
.
focus_results
=
run_focus
()
self
.
focus_results
=
run_focus
()
def
validate
(
self
):
def
validate
(
self
):
return
focus_validation
(
self
.
focus_results
)
return
self
.
focus_results
.
getName
(),
"
ISIS_Powder-POLARIS98533_FocusSempty.nxs
"
def
cleanup
(
self
):
def
cleanup
(
self
):
try
:
try
:
...
@@ -134,33 +136,6 @@ def run_focus():
...
@@ -134,33 +136,6 @@ def run_focus():
sample_empty_scale
=
sample_empty_scale
)
sample_empty_scale
=
sample_empty_scale
)
def
calibration_validator
(
results
):
splined_ws
,
unsplined_ws
=
results
# Get the name of the grouped workspace list
splined_reference_file_name
=
"
ISIS_Powder-POLARIS00098533_splined.nxs
"
unsplined_reference_file_name
=
"
ISIS_Powder-POLARIS00098533_unsplined.nxs
"
return
_compare_ws
(
reference_file_name
=
splined_reference_file_name
,
results
=
splined_ws
)
and
\
_compare_ws
(
reference_file_name
=
unsplined_reference_file_name
,
results
=
unsplined_ws
)
def
focus_validation
(
results
):
reference_file_name
=
"
ISIS_Powder-POLARIS98533_FocusSempty.nxs
"
return
_compare_ws
(
reference_file_name
=
reference_file_name
,
results
=
results
)
def
_compare_ws
(
reference_file_name
,
results
):
ref_ws
=
mantid
.
Load
(
Filename
=
reference_file_name
)
is_valid
=
len
(
results
)
>
0
for
ws
,
ref
in
zip
(
results
,
ref_ws
):
if
not
(
mantid
.
CompareWorkspaces
(
Workspace1
=
ws
,
Workspace2
=
ref
)[
0
]):
is_valid
=
False
print
(
ws
.
getName
()
+
"
was not equal to:
"
+
ref
.
getName
())
return
is_valid
def
setup_mantid_paths
():
def
setup_mantid_paths
():
config
[
'
datasearch.directories
'
]
+=
"
;
"
+
input_dir
config
[
'
datasearch.directories
'
]
+=
"
;
"
+
input_dir
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment