From 8e68bd7a2317b0ccabcbf91298dd639c7c5deda9 Mon Sep 17 00:00:00 2001 From: Nicolas Mounet Date: Mon, 31 May 2021 11:07:53 +0200 Subject: [PATCH] Removing old Expiration and ref. to ExpirationBLO in test_expiration --- cara/tests/test_expiration.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/cara/tests/test_expiration.py b/cara/tests/test_expiration.py index 5cfe94b9..ff08798b 100644 --- a/cara/tests/test_expiration.py +++ b/cara/tests/test_expiration.py @@ -9,7 +9,7 @@ from cara import models def test_multiple_wrong_weight_size(): weights = (1., 2., 3.) - e_base = models.Expiration((0.084, 0.009, 0.003, 0.002)) + e_base = models.Expiration((1., 0., 0.)) with pytest.raises( ValueError, match=re.escape("expirations and weigths should contain the" @@ -19,19 +19,10 @@ def test_multiple_wrong_weight_size(): def test_multiple(): - weights = (1., 2.) - e1 = models.Expiration((0.03, 0.02, 0.01, 0.005)) - e2 = models.Expiration((0.05, 0.04, 0.03, 0.01)) - e = models.MultipleExpiration([e1, e2], weights) - mask = models.Mask.types['No mask'] - assert e.aerosols(mask) == e1.aerosols(mask)/3. + 2*e2.aerosols(mask)/3. - - -def test_multiple_BLO(): weights = (1., 1.) - e1 = models.ExpirationBLO((1., 0., 0.)) - e2 = models.ExpirationBLO((4., 5., 5.)) - e_expected = models.ExpirationBLO((2.5, 2.5, 2.5)) + e1 = models.Expiration((1., 0., 0.)) + e2 = models.Expiration((4., 5., 5.)) + e_expected = models.Expiration((2.5, 2.5, 2.5)) e = models.MultipleExpiration([e1, e2], weights) mask = models.Mask.types['Type I'] - assert e_expected.aerosols(mask) == e.aerosols(mask) + npt.assert_almost_equal(e_expected.aerosols(mask), e.aerosols(mask))