From 46d3ee27051e56e3e88088707ec984be1c99c70a Mon Sep 17 00:00:00 2001 From: Sylvia Biscoveanu <sylvia.biscoveanu@ldas-pcdev2.ligo-wa.caltech.edu> Date: Thu, 4 Jun 2020 07:32:33 -0700 Subject: [PATCH] Fix tests --- test/sampler_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/sampler_test.py b/test/sampler_test.py index 0140b4f7b..1db48de2d 100644 --- a/test/sampler_test.py +++ b/test/sampler_test.py @@ -767,7 +767,8 @@ class TestPymultinest(unittest.TestCase): n_iter_before_update=100, null_log_evidence=-1e90, max_modes=100, mode_tolerance=-1e90, seed=-1, context=0, write_output=True, log_zero=-1e100, - max_iter=0, init_MPI=False, dump_callback=None) + max_iter=0, init_MPI=False, dump_callback='dumper') + self.sampler.kwargs['dump_callback'] = 'dumper' #Check like the dynesty print_func self.assertListEqual([1, 0], self.sampler.kwargs['wrapped_params']) # Check this separately self.sampler.kwargs['wrapped_params'] = None # The dict comparison can't handle lists self.assertDictEqual(expected, self.sampler.kwargs) @@ -782,7 +783,7 @@ class TestPymultinest(unittest.TestCase): n_iter_before_update=100, null_log_evidence=-1e90, max_modes=100, mode_tolerance=-1e90, seed=-1, context=0, write_output=True, log_zero=-1e100, - max_iter=0, init_MPI=False, dump_callback=None) + max_iter=0, init_MPI=False, dump_callback='dumper') for equiv in bilby.core.sampler.base_sampler.NestedSampler.npoints_equiv_kwargs: new_kwargs = self.sampler.kwargs.copy() @@ -790,6 +791,7 @@ class TestPymultinest(unittest.TestCase): new_kwargs[ "wrapped_params" ] = None # The dict comparison can't handle lists + new_kwargs['dump_callback'] = 'dumper' #test like Dynesty print_func new_kwargs[equiv] = 123 self.sampler.kwargs = new_kwargs self.assertDictEqual(expected, self.sampler.kwargs) -- GitLab