From 46e65519a902ec37aa667bf6a9dc5adec2125265 Mon Sep 17 00:00:00 2001 From: Milton Pividori Date: Fri, 8 Sep 2023 10:51:39 -0600 Subject: [PATCH] test_coef_pval: disable speed tests on GitHub Actions --- tests/test_coef_pval.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_coef_pval.py b/tests/test_coef_pval.py index b07917b6..a15d2658 100644 --- a/tests/test_coef_pval.py +++ b/tests/test_coef_pval.py @@ -8,6 +8,8 @@ from ccc.coef import ccc +IN_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" + def test_cm_basic_pvalue_n_permutations_not_given(): # Prepare @@ -241,6 +243,7 @@ def test_cm_single_argument_is_matrix(): @pytest.mark.skipif(os.cpu_count() < 2, reason="requires at least 2 cores") +@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test doesn't work in Github Actions.") def test_cm_large_n_objects_pvalue_permutations_is_parallelized(): # Prepare rs = np.random.RandomState(0) @@ -263,6 +266,7 @@ def test_cm_large_n_objects_pvalue_permutations_is_parallelized(): @pytest.mark.skipif(os.cpu_count() < 2, reason="requires at least 2 cores") +@pytest.mark.skipif(IN_GITHUB_ACTIONS, reason="Test doesn't work in Github Actions.") def test_cm_medium_n_objects_with_many_pvalue_permutations_is_parallelized(): # Prepare rs = np.random.RandomState(0)