Commit 8572f56c authored by Robert Applin's avatar Robert Applin
Browse files

Refs #0. Add a test for the global parameter not having a zero error.

parent a8edd6dd
...@@ -227,6 +227,18 @@ class FittingContextTest(unittest.TestCase): ...@@ -227,6 +227,18 @@ class FittingContextTest(unittest.TestCase):
self.assertTrue( self.assertTrue(
name in log_names, msg="{} not found in log list".format(name)) 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__': if __name__ == '__main__':
unittest.main(buffer=False, verbosity=2) unittest.main(buffer=False, verbosity=2)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment