Skip to content

Commit

Permalink
Merge pull request #335 from sot/quiet-starcat-only-agasc1p8-test
Browse files Browse the repository at this point in the history
Squelch logging warning message in one test
  • Loading branch information
taldcroft authored Aug 14, 2024
2 parents 0022729 + 06f5776 commit 9f6ad6a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions kadi/commands/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
import parse_cm.paths
import parse_cm.tests
import pytest
import ska_helpers.utils
import ska_sun
from astropy.table import Table, vstack
from chandra_time import secs2date
from cxotime import CxoTime
from Quaternion import Quat
from testr.test_helper import has_internet

import kadi
import kadi.commands.states as kcs
from kadi import commands
from kadi.commands import (
Expand Down Expand Up @@ -867,9 +869,10 @@ def test_get_starcat_only_agasc1p8():
conf.set_temp("date_start_agasc1p8_latest", "1994:002"),
):
# Force AGASC 1.7 and show that star identification fails
starcats = get_starcats(
"2002:365:16:00:00", "2002:365:19:00:00", scenario="flight"
)
with ska_helpers.utils.set_log_level(kadi.logger, "CRITICAL"):
starcats = get_starcats(
"2002:365:16:00:00", "2002:365:19:00:00", scenario="flight"
)
assert np.count_nonzero(starcats[0]["id"] == -999) == 0
assert np.count_nonzero(starcats[0]["mag"] == -999) == 0
assert np.count_nonzero(starcats[1]["id"] == -999) == 3
Expand Down

0 comments on commit 9f6ad6a

Please sign in to comment.