|
1 | 1 | import os |
2 | 2 |
|
3 | | -from tests.integration.utils import check_mismatched_images, get_expansions |
| 3 | +from tests.integration.utils import get_expansions |
4 | 4 |
|
5 | 5 | 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 | | - |
34 | 6 |
|
35 | 7 | # Run with: |
36 | | -# pytest tests/integration/test_weekly.py |
| 8 | +# pytest tests/integration/test_bundles.py |
37 | 9 | # Comment/uncomment `skip` declarations to run specific tests. |
38 | 10 |
|
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! |
98 | 14 |
|
99 | 15 |
|
100 | 16 | # @pytest.mark.skip(reason="Not testing") |
|
0 commit comments