From f737f24c642debab443e3ca06c69dd325b720653 Mon Sep 17 00:00:00 2001 From: atharva-2001 Date: Fri, 8 Sep 2023 20:32:08 +0530 Subject: [PATCH] format --- tardis/montecarlo/tests/test_packet_source.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tardis/montecarlo/tests/test_packet_source.py b/tardis/montecarlo/tests/test_packet_source.py index 10e07777e83..710b661814f 100644 --- a/tardis/montecarlo/tests/test_packet_source.py +++ b/tardis/montecarlo/tests/test_packet_source.py @@ -9,10 +9,13 @@ montecarlo_configuration as montecarlo_configuration, ) -class TestPacketSource(): + +class TestPacketSource: @pytest.fixture(scope="class") def packet_unit_test_fpath(self, tardis_ref_path): - return os.path.abspath(os.path.join(tardis_ref_path, "packet_unittest.h5")) + return os.path.abspath( + os.path.join(tardis_ref_path, "packet_unittest.h5") + ) @pytest.fixture(scope="class") def blackbodysimplesource(self, request): @@ -22,7 +25,13 @@ def blackbodysimplesource(self, request): yield cls.bb montecarlo_configuration.LEGACY_MODE_ENABLED = False - def test_bb_packet_sampling(self, request, tardis_ref_data, packet_unit_test_fpath, blackbodysimplesource): + def test_bb_packet_sampling( + self, + request, + tardis_ref_data, + packet_unit_test_fpath, + blackbodysimplesource, + ): if request.config.getoption("--generate-reference"): ref_bb = pd.read_hdf(packet_unit_test_fpath, key="/blackbody") ref_bb.to_hdf( @@ -37,4 +46,4 @@ def test_bb_packet_sampling(self, request, tardis_ref_data, packet_unit_test_fpa unif_energies = self.bb.create_packet_energies(100) assert np.all(np.isclose(nus, ref_df["nus"])) assert np.all(np.isclose(mus, ref_df["mus"])) - assert np.all(np.isclose(unif_energies, ref_df["energies"])) \ No newline at end of file + assert np.all(np.isclose(unif_energies, ref_df["energies"]))