From f7b5a18c3b60244d8308919ada1dce114ed2a7fb Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 26 Nov 2024 16:20:26 -0500 Subject: [PATCH] update test for numpy 2 compatibility --- jwst/lib/tests/test_engdb_mast.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/jwst/lib/tests/test_engdb_mast.py b/jwst/lib/tests/test_engdb_mast.py index faa6d242b8..66a17df001 100644 --- a/jwst/lib/tests/test_engdb_mast.py +++ b/jwst/lib/tests/test_engdb_mast.py @@ -67,22 +67,23 @@ def test_get_records(engdb): [ ({}, [-0.7914494276, -0.7914494276, -0.7914494276, -0.791449368]), ({'include_obstime': True}, - [EngDB_Value(obstime=Time('2022-02-02T22:24:58.053', scale='utc', format='isot'), value=-0.7914494276), - EngDB_Value(obstime=Time('2022-02-02T22:24:58.309', scale='utc', format='isot'), value=-0.7914494276), - EngDB_Value(obstime=Time('2022-02-02T22:24:58.565', scale='utc', format='isot'), value=-0.7914494276), - EngDB_Value(obstime=Time('2022-02-02T22:24:58.821', scale='utc', format='isot'), value=-0.791449368)]), + [EngDB_Value(obstime=Time(59612.9340052431, format='mjd'), value=-0.7914494276), + EngDB_Value(obstime=Time(59612.9340082060, format='mjd'), value=-0.7914494276), + EngDB_Value(obstime=Time(59612.9340111690, format='mjd'), value=-0.7914494276), + EngDB_Value(obstime=Time(59612.9340141319, format='mjd'), value=-0.791449368)]), ({'include_obstime': True, 'zip_results': False}, EngDB_Value( - obstime=[Time('2022-02-02T22:24:58.053', scale='utc', format='isot'), - Time('2022-02-02T22:24:58.309', scale='utc', format='isot'), - Time('2022-02-02T22:24:58.565', scale='utc', format='isot'), - Time('2022-02-02T22:24:58.821', scale='utc', format='isot')], + obstime=[ + Time(59612.9340052431, format='mjd'), + Time(59612.9340082060, format='mjd'), + Time(59612.9340111690, format='mjd'), + Time(59612.9340141319, format='mjd')], value=[-0.7914494276, -0.7914494276, -0.7914494276, -0.791449368])), ({'include_bracket_values': True}, [-0.791449368, -0.7914494276, -0.7914494276, -0.7914494276, -0.791449368, -0.791449368]) ]) def test_get_values(engdb, pars, expected): values = engdb.get_values(*QUERY, **pars) - assert str(values) == str(expected) + assert values == expected def test_negative_aliveness():