Skip to content

Commit

Permalink
Mark OpenAQ S3 bucket test skipped
Browse files Browse the repository at this point in the history
if permission denied
(it should always be now, since was recently made private)
  • Loading branch information
zmoon committed Nov 9, 2023
1 parent 0a0e630 commit b170ec2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_openaq.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def test_openaq():
# First date in the archive, just one file
# Browse the archive at https://openaq-fetches.s3.amazonaws.com/index.html
dates = pd.date_range(start="2013-11-26", end="2013-11-27", freq="H")[:-1]
df = openaq.add_data(dates)
try:
df = openaq.add_data(dates)
except PermissionError:
pytest.skip("private")
assert not df.empty
assert df.siteid.nunique() == 1
assert (df.country == "CN").all() and ((df.time_local - df.time) == pd.Timedelta(hours=8)).all()

0 comments on commit b170ec2

Please sign in to comment.