Skip to content
Snippets Groups Projects
Commit 71b3112b authored by Moritz Huebner's avatar Moritz Huebner
Browse files

Added some tests

parent a86c8c84
No related branches found
No related tags found
1 merge request!55Project restructuring
......@@ -24,6 +24,18 @@ class TestPriorInstantiationWithoutOptionalPriors(unittest.TestCase):
def test_class_instance(self):
self.assertIsInstance(self.prior, tupak.prior.Prior)
def test_magic_call_is_the_same_as_sampling(self):
self.prior = Mock(return_value=0.5)
self.assertEqual(self.prior.sample(), self.p())
def test_base_rescale_method(self):
self.assertIsNone(self.prior.rescale())
def test_base_repr(self):
self.prior = tupak.prior.Prior(name='test_name', latex_label='test_label', minimum=0, maximum=1)
expected_string = "Prior(name='test_name', latex_label='test_label', minimum=0, maximum=1)"
self.assertEqual(expected_string, self.prior.__repr__())
class TestPriorName(unittest.TestCase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment