From 050c1a24b48cd03a24c0ba9a9b48e7b328434c28 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 7 Jul 2022 15:22:44 -0600 Subject: [PATCH] per #685, divided pytests into smaller groups --- .github/parm/pytest_groups.txt | 5 ++++- internal_tests/pytests/pytest.ini | 4 +++- .../ensemble_stat/test_ensemble_stat_wrapper.py | 10 +++++----- .../wrappers/grid_stat/test_grid_stat_wrapper.py | 8 ++++---- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/parm/pytest_groups.txt b/.github/parm/pytest_groups.txt index d25461ceb8..374b99da80 100644 --- a/.github/parm/pytest_groups.txt +++ b/.github/parm/pytest_groups.txt @@ -1,3 +1,6 @@ +util wrapper wrapper_a -plotting_or_long_or_util +wrapper_b +wrapper_c +plotting_or_long diff --git a/internal_tests/pytests/pytest.ini b/internal_tests/pytests/pytest.ini index 63be30cc70..8630509ec0 100644 --- a/internal_tests/pytests/pytest.ini +++ b/internal_tests/pytests/pytest.ini @@ -1,7 +1,9 @@ [pytest] markers = util: custom marker for testing metplus/util logic - wrapper: custom marker for testing metplus/wrapper logic wrapper_a: custom marker for testing metplus/wrapper logic - A group + wrapper_b: custom marker for testing metplus/wrapper logic - B group + wrapper_c: custom marker for testing metplus/wrapper logic - C group + wrapper: custom marker for testing metplus/wrapper logic - all others long: custom marker for tests that take a long time to run plotting: custom marker for tests that involve plotting diff --git a/internal_tests/pytests/wrappers/ensemble_stat/test_ensemble_stat_wrapper.py b/internal_tests/pytests/wrappers/ensemble_stat/test_ensemble_stat_wrapper.py index ea6757eec5..b28d875704 100644 --- a/internal_tests/pytests/wrappers/ensemble_stat/test_ensemble_stat_wrapper.py +++ b/internal_tests/pytests/wrappers/ensemble_stat/test_ensemble_stat_wrapper.py @@ -106,7 +106,7 @@ def set_minimum_config_settings(config, set_fields=True): }), ] ) -@pytest.mark.wrapper_a +@pytest.mark.wrapper_c def test_ensemble_stat_field_info(metplus_config, config_overrides, env_var_values): @@ -158,7 +158,7 @@ def test_ensemble_stat_field_info(metplus_config, config_overrides, {'CLIMO_STDEV_FILE': '"/climo/stdev/dir/gs_stdev_YMDH.tmpl"', }), ] ) -@pytest.mark.wrapper_a +@pytest.mark.wrapper_c def test_handle_climo_file_variables(metplus_config, config_overrides, env_var_values): """! Ensure that old and new variables for setting climo_mean and @@ -666,7 +666,7 @@ def test_handle_climo_file_variables(metplus_config, config_overrides, ] ) -@pytest.mark.wrapper_a +@pytest.mark.wrapper_c def test_ensemble_stat_single_field(metplus_config, config_overrides, env_var_values): @@ -723,7 +723,7 @@ def test_ensemble_stat_single_field(metplus_config, config_overrides, assert(env_var_values.get(env_var_key, '') == actual_value) -@pytest.mark.wrapper_a +@pytest.mark.wrapper_c def test_get_config_file(metplus_config): fake_config_name = '/my/config/file' @@ -746,7 +746,7 @@ def test_get_config_file(metplus_config): ({'ENSEMBLE_STAT_ENS_MEMBER_IDS': '1'}, 1), ] ) -@pytest.mark.wrapper_a +@pytest.mark.wrapper_c def test_ensemble_stat_fill_missing(metplus_config, config_overrides, expected_num_files): config = metplus_config() diff --git a/internal_tests/pytests/wrappers/grid_stat/test_grid_stat_wrapper.py b/internal_tests/pytests/wrappers/grid_stat/test_grid_stat_wrapper.py index d6291085f5..701821dc99 100644 --- a/internal_tests/pytests/wrappers/grid_stat/test_grid_stat_wrapper.py +++ b/internal_tests/pytests/wrappers/grid_stat/test_grid_stat_wrapper.py @@ -85,7 +85,7 @@ def set_minimum_config_settings(config): {'FCST_IS_PROB': False, 'OBS_IS_PROB': False}), ] ) -@pytest.mark.wrapper_a +@pytest.mark.wrapper_b def test_grid_stat_is_prob(metplus_config, config_overrides, expected_values): config = metplus_config() @@ -124,7 +124,7 @@ def test_grid_stat_is_prob(metplus_config, config_overrides, expected_values): {'CLIMO_STDEV_FILE': '"/climo/stdev/dir/gs_stdev_YMDH.tmpl"', }), ] ) -@pytest.mark.wrapper_a +@pytest.mark.wrapper_b def test_handle_climo_file_variables(metplus_config, config_overrides, env_var_values): """! Ensure that old and new variables for setting climo_mean and @@ -688,7 +688,7 @@ def test_handle_climo_file_variables(metplus_config, config_overrides, ] ) -@pytest.mark.wrapper_a +@pytest.mark.wrapper_b def test_grid_stat_single_field(metplus_config, config_overrides, env_var_values): @@ -743,7 +743,7 @@ def test_grid_stat_single_field(metplus_config, config_overrides, assert env_var_values.get(env_var_key, '') == actual_value -@pytest.mark.wrapper_a +@pytest.mark.wrapper_b def test_get_config_file(metplus_config): fake_config_name = '/my/config/file'