Skip to content

Commit 12e9342

Browse files
committed
skip running test on cmorizers that need pys2index
1 parent d4af838 commit 12e9342

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

tests/unit/cmorizers/test_cmorization_interface.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,22 @@ def test_formatters_have_required_interface():
2020

2121
error = False
2222

23-
for formatter in os.listdir(formatters_folder):
24-
if not formatter.endswith(".py") or formatter == "__init__.py":
23+
# aeronet.py and noaa_gml_surface_flask*.py need pys2index
24+
do_not_run_formatters = [
25+
'__init__.py',
26+
'aeronet.py',
27+
'noaa_gml_surface_flask.py',
28+
'noaa_gml_surface_flask_ch4.py',
29+
'noaa_gml_surface_flask_co2.py',
30+
'noaa_gml_surface_flask_n2o.py',
31+
]
32+
all_formatters = os.listdir(formatters_folder)
33+
to_run_formatters = [
34+
f for f in all_formatters if f not in do_not_run_formatters
35+
]
36+
37+
for formatter in to_run_formatters:
38+
if not formatter.endswith(".py"):
2539
continue
2640
module = formatter[:-3]
2741
member = importlib.import_module(

0 commit comments

Comments
 (0)