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
3497530e
Commit
3497530e
authored
8 years ago
by
Duc Le
Browse files
Options
Downloads
Patches
Plain Diff
Re #10147 - Fixed unit test with new LET mode names
parent
80bfab79
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
scripts/test/PyChopTest.py
+3
-3
3 additions, 3 deletions
scripts/test/PyChopTest.py
with
3 additions
and
3 deletions
scripts/test/PyChopTest.py
+
3
−
3
View file @
3497530e
...
@@ -41,7 +41,7 @@ class PyChop2Tests(unittest.TestCase):
...
@@ -41,7 +41,7 @@ class PyChop2Tests(unittest.TestCase):
# Tests the different variants of LET
# Tests the different variants of LET
def
test_pychop_let
(
self
):
def
test_pychop_let
(
self
):
variants
=
[
'
High flux
'
,
'
Medium flux
'
,
'
Low flux
'
]
variants
=
[
'
High flux
'
,
'
Intermediate
'
,
'
High resolution
'
]
res
=
[]
res
=
[]
flux
=
[]
flux
=
[]
for
inc
,
variant
in
enumerate
(
variants
):
for
inc
,
variant
in
enumerate
(
variants
):
...
@@ -59,10 +59,10 @@ class PyChop2Tests(unittest.TestCase):
...
@@ -59,10 +59,10 @@ class PyChop2Tests(unittest.TestCase):
rr
,
ff
=
chopobj
.
getResFlux
(
np
.
linspace
(
0
,
17
,
10
))
rr
,
ff
=
chopobj
.
getResFlux
(
np
.
linspace
(
0
,
17
,
10
))
res
.
append
(
rr
)
res
.
append
(
rr
)
flux
.
append
(
ff
)
flux
.
append
(
ff
)
# Checks that the flux should be highest for 'High flux', then '
Medium flux' then 'Low flux
'
# Checks that the flux should be highest for 'High flux', then '
Intermediate', 'High resolution
'
self
.
assertTrue
(
flux
[
0
]
>
flux
[
1
])
self
.
assertTrue
(
flux
[
0
]
>
flux
[
1
])
self
.
assertTrue
(
flux
[
1
]
>=
flux
[
2
])
self
.
assertTrue
(
flux
[
1
]
>=
flux
[
2
])
# Checks that the resolution should be best for '
Low flux', then 'Medium flux' then
'High flux'
# Checks that the resolution should be best for '
High resolution', then 'Intermediate',
'High flux'
self
.
assertTrue
(
res
[
2
][
0
]
<=
res
[
1
][
0
])
self
.
assertTrue
(
res
[
2
][
0
]
<=
res
[
1
][
0
])
self
.
assertTrue
(
res
[
1
][
0
]
<=
res
[
0
][
0
])
self
.
assertTrue
(
res
[
1
][
0
]
<=
res
[
0
][
0
])
# Now tests the standalone function
# Now tests the standalone function
...
...
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