Skip to content

Commit ba6fe4c

Browse files
committed
Update test names to reflect new image checker
1 parent 218f55d commit ba6fe4c

File tree

4 files changed

+12
-94
lines changed

4 files changed

+12
-94
lines changed

tests/integration/generated/update_weekly_expected_files_chrysalis.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Run this script to update expected files for test_weekly.py
1+
# Run this script to update expected files used by both test_bundles.py & test_images.py.
22
# Run from the top level of the zppy repo
33
# Run as `./tests/integration/generated/update_weekly_expected_files_chrysalis.sh`
44

@@ -27,4 +27,5 @@ do
2727
done
2828

2929
# Rerun test
30-
pytest tests/integration/test_weekly.py
30+
pytest tests/integration/test_bundles.py
31+
pytest tests/integration/test_images.py

tests/integration/template_update_weekly_expected_files.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Run this script to update expected files for test_weekly.py
1+
# Run this script to update expected files used by both test_bundles.py & test_images.py.
22
# Run from the top level of the zppy repo
33
# Run as `./tests/integration/generated/update_weekly_expected_files_#expand machine#.sh`
44

@@ -27,4 +27,5 @@ do
2727
done
2828

2929
# Rerun test
30-
pytest tests/integration/test_weekly.py
30+
pytest tests/integration/test_bundles.py
31+
pytest tests/integration/test_images.py

tests/integration/test_weekly.py renamed to tests/integration/test_bundles.py

Lines changed: 5 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,16 @@
11
import os
22

3-
from tests.integration.utils import check_mismatched_images, get_expansions
3+
from tests.integration.utils import get_expansions
44

55
V3_CASE_NAME = "v3.LR.historical_0051"
6-
V2_CASE_NAME = "v2.LR.historical_0201"
7-
8-
9-
def check_images(test_name, case_name, subdir):
10-
# See docs/source/dev_guide/testing.rst for steps to run before running this test.
11-
expansions = get_expansions()
12-
expected_dir = expansions["expected_dir"]
13-
user_www = expansions["user_www"]
14-
unique_id = expansions["unique_id"]
15-
actual_images_dir = (
16-
f"{user_www}zppy_weekly_{test_name}_www/{unique_id}/{case_name}/"
17-
)
18-
19-
# The expected_images_file lists all images we expect to compare.
20-
expected_images_file = f"{expected_dir}image_list_expected_{test_name}.txt"
21-
expected_images_dir = f"{expected_dir}expected_{test_name}"
22-
23-
# The directory to place differences in.
24-
diff_dir = f"{actual_images_dir}image_check_failures_{test_name}"
25-
26-
check_mismatched_images(
27-
actual_images_dir,
28-
expected_images_file,
29-
expected_images_dir,
30-
diff_dir,
31-
subdir,
32-
)
33-
346

357
# Run with:
36-
# pytest tests/integration/test_weekly.py
8+
# pytest tests/integration/test_bundles.py
379
# Comment/uncomment `skip` declarations to run specific tests.
3810

39-
40-
# @pytest.mark.skip(reason="Not testing")
41-
def test_comprehensive_v2_e3sm_diags_images():
42-
check_images("comprehensive_v2", V2_CASE_NAME, "e3sm_diags")
43-
44-
45-
# @pytest.mark.skip(reason="Not testing")
46-
def test_comprehensive_v2_mpas_analysis_images():
47-
check_images("comprehensive_v2", V2_CASE_NAME, "mpas_analysis")
48-
49-
50-
# @pytest.mark.skip(reason="Not testing")
51-
def test_comprehensive_v2_global_time_series_images():
52-
check_images("comprehensive_v2", V2_CASE_NAME, "global_time_series")
53-
54-
55-
# @pytest.mark.skip(reason="Not testing")
56-
def test_comprehensive_v2_ilamb_images():
57-
check_images("comprehensive_v2", V2_CASE_NAME, "ilamb")
58-
59-
60-
# @pytest.mark.skip(reason="Not testing")
61-
def test_comprehensive_v3_e3sm_diags_images():
62-
check_images("comprehensive_v3", V3_CASE_NAME, "e3sm_diags")
63-
64-
65-
# @pytest.mark.skip(reason="Not testing")
66-
def test_comprehensive_v3_mpas_analysis_images():
67-
check_images("comprehensive_v3", V3_CASE_NAME, "mpas_analysis")
68-
69-
70-
# @pytest.mark.skip(reason="Not testing")
71-
def test_comprehensive_v3_global_time_series_images():
72-
check_images("comprehensive_v3", V3_CASE_NAME, "global_time_series")
73-
74-
75-
# @pytest.mark.skip(reason="Not testing")
76-
def test_comprehensive_v3_ilamb_images():
77-
check_images("comprehensive_v3", V3_CASE_NAME, "ilamb")
78-
79-
80-
# @pytest.mark.skip(reason="Not testing")
81-
def test_bundles_e3sm_diags_images():
82-
check_images("bundles", V3_CASE_NAME, "e3sm_diags")
83-
84-
85-
# @pytest.mark.skip(reason="Not testing")
86-
def test_bundles_mpas_analysis_images():
87-
check_images("bundles", V3_CASE_NAME, "mpas_analysis")
88-
89-
90-
# @pytest.mark.skip(reason="Not testing")
91-
def test_bundles_global_time_series_images():
92-
check_images("bundles", V3_CASE_NAME, "global_time_series")
93-
94-
95-
# @pytest.mark.skip(reason="Not testing")
96-
def test_bundles_ilamb_images():
97-
check_images("bundles", V3_CASE_NAME, "ilamb")
11+
# Image check tests should also be run weekly. Run:
12+
# pytest tests/integration/test_images.py
13+
# The bundles tests in this file use the same output as the bundles image tests!
9814

9915

10016
# @pytest.mark.skip(reason="Not testing")

tests/integration/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def generate_cfgs(unified_testing=False, dry_run=False):
409409
"bash_generation",
410410
"campaign",
411411
"defaults",
412-
"weekly",
412+
"weekly", # for both test_bundles and test_images
413413
]
414414
for script_name in script_names:
415415
script_template = f"{git_top_level}/tests/integration/template_update_{script_name}_expected_files.sh"

0 commit comments

Comments
 (0)