Skip to content

Commit

Permalink
add some more pyaerocom testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Griesfeller committed Nov 11, 2024
1 parent 5bd7ac5 commit 434d2f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_PyerocomBinding.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TestPyaroReaderPyaerocom(unittest.TestCase):
}
AERONETVAR = "od440aer"
ACTRISEBASVAR = "concso4t"
ACTRISEBASVARLIST = ["concso4t","concso4c"]


def test_pyaerocom_aeronet(self):
Expand Down Expand Up @@ -65,6 +66,7 @@ def test_pyaerocom_actrisebas_single_var(self):
data = reader.read(vars_to_retrieve=self.ACTRISEBASVAR, configs=obsconfig)
self.assertGreaterEqual(len(data.unique_station_names), 4)
self.assertIn("Ispra", data.unique_station_names)
self.assertIn(url, data.contains_vars)

def test_pyaerocom_actrisebas_many_var(self):
# test multi var reading via pyaerocom
Expand All @@ -86,7 +88,7 @@ def test_pyaerocom_actrisebas_many_var(self):
}
# needs to be the variable name for actrisebas, but PyaroConfig wants this to a string and not a list
# (the pydantic setup is too pedantic)
url = self.ACTRISEBASVAR
url = self.ACTRISEBASVARLIST
obsconfig = PyaroConfig(
name=data_name,
data_id=data_id,
Expand All @@ -97,6 +99,9 @@ def test_pyaerocom_actrisebas_many_var(self):
data = reader.read(vars_to_retrieve=self.ACTRISEBASVAR, configs=obsconfig)
self.assertGreaterEqual(len(data.unique_station_names), 4)
self.assertIn("Ispra", data.unique_station_names)
self.assertIn(url[0], data.contains_vars)
# This does unfortunately not return the two variables asked for, but only the first:
self.assertIn(url[1], data.contains_vars)



Expand Down

0 comments on commit 434d2f9

Please sign in to comment.