Skip to content

Commit 85446f2

Browse files
authored
Unit and integration test fixes (#736)
1 parent cabe0cd commit 85446f2

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

tests/integration/test_images.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ def test_images():
5454
if "weekly_bundles" in expansions["cfgs_to_run"]:
5555
# No mpas_analysis
5656
if "mpas_analysis" in expansions["tasks_to_run"]:
57-
tasks_to_run = tasks_to_run.copy()
58-
tasks_to_run.remove("mpas_analysis")
57+
tasks_to_run_copy = tasks_to_run.copy()
58+
tasks_to_run_copy.remove("mpas_analysis")
5959
set_up_and_run_image_checker(
6060
"bundles",
6161
V3_CASE_NAME,
6262
expansions,
6363
diff_dir_suffix,
64-
tasks_to_run,
64+
tasks_to_run_copy,
6565
test_results_dict,
6666
)
6767

@@ -90,14 +90,14 @@ def test_images():
9090
if "weekly_legacy_3.0.0_bundles" in expansions["cfgs_to_run"]:
9191
# No mpas_analysis
9292
if "mpas_analysis" in expansions["tasks_to_run"]:
93-
tasks_to_run = tasks_to_run.copy()
94-
tasks_to_run.remove("mpas_analysis")
93+
tasks_to_run_copy = tasks_to_run.copy()
94+
tasks_to_run_copy.remove("mpas_analysis")
9595
set_up_and_run_image_checker(
9696
"legacy_3.0.0_bundles",
9797
V3_CASE_NAME,
9898
expansions,
9999
diff_dir_suffix,
100-
tasks_to_run,
100+
tasks_to_run_copy,
101101
test_results_dict,
102102
)
103103
except Exception as e:

zppy/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ def set_grid(c: Dict[str, Any]) -> None:
187187
c["grid"] = "glb"
188188
else:
189189
tmp = os.path.basename(c["mapping_file"])
190-
# FIXME: W605 invalid escape sequence '\.'
191-
tmp = re.sub("\.[^.]*\.nc$", "", tmp) # noqa: W605
190+
tmp = re.sub(r"\.[^.]*\.nc$", "", tmp)
192191
tmp = tmp.split("_")
193192
if tmp[0] == "map":
194193
c["grid"] = f"{tmp[-2]}_{tmp[-1]}"

0 commit comments

Comments
 (0)