From 3e7b4a8bebc8367175440eab4cc5634cb4a886fa Mon Sep 17 00:00:00 2001 From: mferg Date: Fri, 9 Jan 2026 09:40:44 -0500 Subject: [PATCH 1/2] add flag to tests --- tests/test_integration.py | 24 +++++++++++++++++++++++- tests/test_submission/test_endpoints.py | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/test_integration.py b/tests/test_integration.py index 8b2fce1a..ba29859a 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -58,6 +58,27 @@ def test_score(model_identifier, benchmark_identifier, expected_score): assert actual_score == expected_score +@pytest.mark.parametrize( + "model_identifier, benchmark_identifier, expected_score, install_dependencies", + [ + ("randomembedding-100", "Pereira2018.243sentences-linear", + approx(0.0285022, abs=_SCORE_ATOL), "newenv"), + ] +) +def test_score_with_install_dependencies( + model_identifier, benchmark_identifier, expected_score, install_dependencies): + install_dependence_preference = os.environ.get( + "BS_INSTALL_DEPENDENCIES", "yes") + os.environ["BS_INSTALL_DEPENDENCIES"] = install_dependencies + actual_score = score( + model_identifier=model_identifier, + benchmark_identifier=benchmark_identifier, + conda_active=True) + os.environ["BS_INSTALL_DEPENDENCIES"] = install_dependence_preference + assert actual_score == expected_score + + +@pytest.mark.travis_slow @pytest.mark.parametrize( "model_identifier, benchmark_identifier, expected_score, install_dependencies", [ @@ -69,7 +90,7 @@ def test_score(model_identifier, benchmark_identifier, expected_score): approx(0.0285022, abs=_SCORE_ATOL), "no"), ] ) -def test_score_with_install_dependencies( +def test_score_with_install_dependencies_slow( model_identifier, benchmark_identifier, expected_score, install_dependencies): install_dependence_preference = os.environ.get( "BS_INSTALL_DEPENDENCIES", "yes") @@ -82,6 +103,7 @@ def test_score_with_install_dependencies( assert actual_score == expected_score +@pytest.mark.travis_slow def test_commandline_score(): process = subprocess.run( [ diff --git a/tests/test_submission/test_endpoints.py b/tests/test_submission/test_endpoints.py index 9265b395..441be5ba 100644 --- a/tests/test_submission/test_endpoints.py +++ b/tests/test_submission/test_endpoints.py @@ -34,6 +34,7 @@ def teardown_method(self): logger.info('Clean database') clear_schema() + @pytest.mark.travis_slow def test_successful_run(self): args_dict = {'jenkins_id': 62, 'user_id': 1, 'model_type': 'artificialsubject', 'public': True, 'competition': 'None', 'new_models': ['randomembedding-100'], From 73400f118e3a5ce4554debcddc730433469b1cf9 Mon Sep 17 00:00:00 2001 From: mferg Date: Fri, 9 Jan 2026 10:43:41 -0500 Subject: [PATCH 2/2] remove slow test --- tests/test_integration.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/tests/test_integration.py b/tests/test_integration.py index ba29859a..a6ebb45c 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -58,26 +58,6 @@ def test_score(model_identifier, benchmark_identifier, expected_score): assert actual_score == expected_score -@pytest.mark.parametrize( - "model_identifier, benchmark_identifier, expected_score, install_dependencies", - [ - ("randomembedding-100", "Pereira2018.243sentences-linear", - approx(0.0285022, abs=_SCORE_ATOL), "newenv"), - ] -) -def test_score_with_install_dependencies( - model_identifier, benchmark_identifier, expected_score, install_dependencies): - install_dependence_preference = os.environ.get( - "BS_INSTALL_DEPENDENCIES", "yes") - os.environ["BS_INSTALL_DEPENDENCIES"] = install_dependencies - actual_score = score( - model_identifier=model_identifier, - benchmark_identifier=benchmark_identifier, - conda_active=True) - os.environ["BS_INSTALL_DEPENDENCIES"] = install_dependence_preference - assert actual_score == expected_score - - @pytest.mark.travis_slow @pytest.mark.parametrize( "model_identifier, benchmark_identifier, expected_score, install_dependencies", @@ -90,7 +70,7 @@ def test_score_with_install_dependencies( approx(0.0285022, abs=_SCORE_ATOL), "no"), ] ) -def test_score_with_install_dependencies_slow( +def test_score_with_install_dependencies( model_identifier, benchmark_identifier, expected_score, install_dependencies): install_dependence_preference = os.environ.get( "BS_INSTALL_DEPENDENCIES", "yes")