Skip to content

Commit

Permalink
ENH: Expanding test_airnow coverage based on latest run results (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamTheisen authored Jun 20, 2022
1 parent 8e5f2a7 commit 078ee8f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions act/tests/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ def test_airnow():
assert results['ParameterName'].values[1] == 'PM2.5'
assert results['CategoryName'].values[0] == 'Good'

results = act.discovery.get_airnow_obs(token, zipcode=60108, distance=50)
assert results['ReportingArea'].values[0] == 'Chicago'
results = act.discovery.get_airnow_obs(token, latlon=[41.958, -88.12], distance=50)
assert results['StateCode'].values[0] == 'IL'

with np.testing.assert_raises(NameError):
results = act.discovery.get_airnow_obs(token)
with np.testing.assert_raises(NameError):
results = act.discovery.get_airnow_forecast(token, '2022-05-01')

results = act.discovery.get_airnow_obs(token, date='2022-05-01', distance=50, latlon=[41.958, -88.12])
assert results['AQI'].values[0] == 30
assert results['ParameterName'].values[1] == 'PM2.5'
Expand Down

0 comments on commit 078ee8f

Please sign in to comment.