Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
d99128a2
Commit
d99128a2
authored
Jul 18, 2013
by
Owen Arnold
Browse files
refs #7472. Fix errors in unit test.
parent
516cb690
Changes
1
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/scripts/test/ReflectometryQuickAuxiliaryTest.py
View file @
d99128a2
...
...
@@ -27,7 +27,7 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase):
# Should remove workspaces starting with _
quick
.
cleanup
()
cleaned_object_names
=
mtd
.
getObjectNames
()
self
.
assertEqual
(
1
,
len
(
cleaned_object_names
))
self
.
assertEqual
(
numObjectsOriginal
+
1
,
len
(
cleaned_object_names
))
self
.
assertEqual
(
True
,
(
'tokeep'
in
cleaned_object_names
))
DeleteWorkspace
(
tokeep
)
...
...
@@ -82,7 +82,6 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase):
instrument
=
quick
.
groupGet
(
mtd
[
self
.
__wsName
][
0
].
name
(),
'inst'
)
self
.
assertEquals
(
expectedInstrument
,
instrument
.
getName
(),
"Did not fetch the instrument from ws"
)
DeleteWorkspace
(
mtd
[
wsName
])
def
test_groupGet_histogram_count
(
self
):
expectedNHistograms
=
mtd
[
self
.
__wsName
][
0
].
getNumberHistograms
()
...
...
@@ -101,15 +100,13 @@ class ReflectometryQuickAuxiliaryTest(unittest.TestCase):
expectedNPeriods
=
2
# Test with group workspace as input
nPeriods
=
quick
.
groupGet
(
wsName
,
'samp'
,
'nperiods'
)
nPeriods
=
quick
.
groupGet
(
self
.
__
wsName
,
'samp'
,
'nperiods'
)
self
.
assertEquals
(
expectedNPeriods
,
nPeriods
,
"Did not fetch the number of periods from ws group"
)
# Test with single workspace as input
nPeriods
=
quick
.
groupGet
(
mtd
[
wsName
][
0
].
name
(),
'samp'
,
'nperiods'
)
nPeriods
=
quick
.
groupGet
(
mtd
[
self
.
__
wsName
][
0
].
name
(),
'samp'
,
'nperiods'
)
self
.
assertEquals
(
expectedNPeriods
,
nPeriods
,
"Did not fetch the number of periods from ws"
)
DeleteWorkspace
(
mtd
[
self
.
__wsName
])
def
test_groupGet_multi_value_log
(
self
):
# Expected start theta, taken from the last value of the time series log.
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment