Skip to content

Commit

Permalink
per #685, divided pytests into smaller groups
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe committed Jul 7, 2022
1 parent 69b0cce commit 050c1a2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .github/parm/pytest_groups.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
util
wrapper
wrapper_a
plotting_or_long_or_util
wrapper_b
wrapper_c
plotting_or_long
4 changes: 3 additions & 1 deletion internal_tests/pytests/pytest.ini
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):

Expand Down Expand Up @@ -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'

Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):

Expand Down Expand Up @@ -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'

Expand Down

0 comments on commit 050c1a2

Please sign in to comment.