Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
8572f56c
Commit
8572f56c
authored
Sep 09, 2021
by
Robert Applin
Browse files
Refs #0. Add a test for the global parameter not having a zero error.
parent
a8edd6dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/test/Muon/fitting_context_test.py
View file @
8572f56c
...
...
@@ -227,6 +227,18 @@ class FittingContextTest(unittest.TestCase):
self
.
assertTrue
(
name
in
log_names
,
msg
=
"{} not found in log list"
.
format
(
name
))
def
test_that_the_non_zero_global_parameter_error_is_saved_in_the_fit_parameter
(
self
):
globals
=
[
'Height'
]
test_parameters
=
OrderedDict
([(
'Height'
,
(
10.
,
0.0
)),
(
'Height'
,
(
10.
,
0.4
)),
(
'f0.A0'
,
(
1
,
0.01
)),
(
'f1.A0'
,
(
1
,
0.01
)),
(
'Cost function'
,
(
0.1
,
0.
))])
fit_params
=
create_test_fit_parameters
(
test_parameters
,
globals
)
self
.
assertEqual
(
fit_params
.
value
(
"Height"
),
10.0
)
self
.
assertEqual
(
fit_params
.
error
(
"Height"
),
0.4
)
if
__name__
==
'__main__'
:
unittest
.
main
(
buffer
=
False
,
verbosity
=
2
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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