Skip to content

Commit

Permalink
update test for numpy 2 compatibility (#8982)
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram authored Dec 2, 2024
2 parents 615714b + f7b5a18 commit 6dece9c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions jwst/lib/tests/test_engdb_mast.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 6dece9c

Please sign in to comment.