Skip to content

Commit

Permalink
TST: update cosmology test in result tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mj-will committed Nov 28, 2024
1 parent c49c5d3 commit 235992c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions test/gw/result_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import unittest

import pandas as pd
from parameterized import parameterized

import bilby

Expand Down Expand Up @@ -201,14 +200,11 @@ def test_detector_injection_properties_no_injection(self):
self.result.detector_injection_properties("not_a_detector"), None
)

@parameterized.expand(["Planck18", "Planck15", "Planck15_LAL"])
def test_cosmology(self, cosmology):
from bilby.gw.cosmology import get_cosmology, set_cosmology
set_cosmology(cosmology)
cosmo = get_cosmology()
self.assertEqual(self.result.cosmology, cosmo)
# Reset the cosmology to the default
set_cosmology("Planck15")
def test_cosmology(self):
self.assertEqual(
self.result.cosmology,
self.meta_data["cosmology"],
)


if __name__ == "__main__":
Expand Down

0 comments on commit 235992c

Please sign in to comment.