Skip to content

Commit

Permalink
Use printer for AirNow UTC offset info
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon committed Aug 7, 2024
1 parent 6f2ed7a commit c8c1d8b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/test_airnow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import warnings

import pandas as pd
import pytest

Expand Down Expand Up @@ -73,7 +71,7 @@ def test_add_data_daily():
"yesterday", # varies
],
)
def test_check_zero_utc_offsets(date, bad_utcoffset, request, is_ci):
def test_check_zero_utc_offsets(date, bad_utcoffset, request, printer):
dates = [date]

case = request.node.callspec.id.split("-")[0]
Expand All @@ -96,8 +94,7 @@ def test_check_zero_utc_offsets(date, bad_utcoffset, request, is_ci):
f"{len(bad_sites)} sites with zero UTC offset and abs(lon) > 20:\n"
)
msg += bad_sites.to_string(index=False)
if not is_ci:
warnings.warn(msg)
printer(msg)
elif bad_utcoffset == "null":
if case in {"multiple_bad", "some_bad"}:
assert df.utcoffset.isnull().sum() > 0
Expand Down

0 comments on commit c8c1d8b

Please sign in to comment.