From d951d42ad0771591f3c7159baea18486e8d267f3 Mon Sep 17 00:00:00 2001 From: Patrick Godwin <patrick.godwin@ligo.org> Date: Wed, 19 Jun 2019 19:00:23 -0700 Subject: [PATCH] p_astro_gstlal.py: add json import to doctests to avoid unit test failures --- gstlal-inspiral/python/p_astro_gstlal.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gstlal-inspiral/python/p_astro_gstlal.py b/gstlal-inspiral/python/p_astro_gstlal.py index 036ca4ee48..c4fde91810 100644 --- a/gstlal-inspiral/python/p_astro_gstlal.py +++ b/gstlal-inspiral/python/p_astro_gstlal.py @@ -323,6 +323,7 @@ def compute_p_astro(event_ln_likelihood_ratio, Example ------- + >>> import json >>> p_astros = json.loads(compute_p_astro(files)) >>> p_astros {'BNS': 0.999, 'BBH': 0.0, 'NSBH': 0.0, 'Terrestrial': 0.001} @@ -385,6 +386,7 @@ def compute_p_astro_approx(snr, far, mass1, mass2, livetime, mean_values_dict): Example ------- + >>> import json >>> p_astros = json.loads(compute_p_astro(files)) >>> p_astros {'BNS': 0.999, 'BBH': 0.0, 'NSBH': 0.0, 'Terrestrial': 0.001} -- GitLab