Skip to content
Snippets Groups Projects
Commit f8b004a8 authored by Michael Williams's avatar Michael Williams Committed by Colm Talbot
Browse files

Fix DirichletElement pickle

parent 7afbc747
No related branches found
No related tags found
No related merge requests found
......@@ -372,6 +372,7 @@ class DirichletElement(ConditionalBeta):
label + str(ii) for ii in range(order)
]
self.__class__.__name__ = 'DirichletElement'
self.__class__.__qualname__ = 'DirichletElement'
def dirichlet_condition(self, reference_parms, **kwargs):
remaining = 1 - sum(
......
......@@ -5,6 +5,7 @@ from unittest import mock
import numpy as np
import pandas as pd
import pickle
import bilby
......@@ -472,6 +473,10 @@ class TestDirichletPrior(unittest.TestCase):
test = bilby.core.prior.PriorDict.from_json(filename="priors/test_prior.json")
self.assertEqual(self.priors, test)
def test_pickle(self):
"""Assert can be pickled (needed for use with bilby_pipe)"""
pickle.dumps(self.priors)
if __name__ == "__main__":
unittest.main()
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