Skip to content
Snippets Groups Projects
Commit 66797fc2 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Fix test and add posterior check

parent 90ab4b4c
No related branches found
No related tags found
1 merge request!407Remove pipenv commands, resolve pandas dependency issue, remove TD test
Pipeline #53946 passed
......@@ -200,7 +200,8 @@ class Result(object):
if len(dictionary) == 1 and 'data' in dictionary:
dictionary = dictionary['data']
try:
dictionary['posterior'] = pd.DataFrame(dictionary['posterior'])
if isinstance(dictionary.get('posterior', None), dict):
dictionary['posterior'] = pd.DataFrame(dictionary['posterior'])
return cls(**dictionary)
except TypeError as e:
raise IOError("Unable to load dictionary, error={}".format(e))
......
......@@ -159,10 +159,9 @@ class TestGWUtils(unittest.TestCase):
0.1, 0, 0.6, 0.5, 0.6, 0.1, 0.8, 30.6, 23.2, 50, 0)
self.assertTrue(len(a) == 7)
# def test_get_approximant(self):
# with self.assertRaises(ValueError):
# gwutils.lalsim_GetApproximantFromString(10)
# self.assertEqual(gwutils.lalsim_GetApproximantFromString("IMRPhenomPV2"), 69)
def test_get_approximant(self):
with self.assertRaises(ValueError):
gwutils.lalsim_GetApproximantFromString(10)
def test_lalsim_SimInspiralChooseFDWaveform(self):
a = gwutils.lalsim_SimInspiralChooseFDWaveform(
......
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