Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squelch logging warning message in one test #335

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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