From b170ec2cae43b5ab99100a86f8fb289298ef4bb1 Mon Sep 17 00:00:00 2001 From: zmoon Date: Thu, 9 Nov 2023 10:36:36 -0700 Subject: [PATCH] Mark OpenAQ S3 bucket test skipped if permission denied (it should always be now, since was recently made private) --- tests/test_openaq.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_openaq.py b/tests/test_openaq.py index a349544c..f3ec743b 100644 --- a/tests/test_openaq.py +++ b/tests/test_openaq.py @@ -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()