diff --git a/pyproject.toml b/pyproject.toml index 5475544..bd2f04e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,4 +14,4 @@ ignore = [ "*.sage.py" = ["F403", "F405", "F821", "E741", "E402", "E702", "I001", "W291", "W293", "W292"] # test_smoke.py star-imports sage.all and loads a .sage file, so ruff can't see where its names come from. -"tests/test_smoke.py" = ["F403", "F405"] +"tests/topdata_tests.py" = ["F403", "F405"] diff --git a/tests/playground_models.sage b/tests/test_models.sage similarity index 99% rename from tests/playground_models.sage rename to tests/test_models.sage index d4c624b..d69e8c1 100644 --- a/tests/playground_models.sage +++ b/tests/test_models.sage @@ -2,7 +2,7 @@ # expected_intersection_numbers_CY), where expected_disc is a list of # (str(discriminant_factor), codimension) pairs as returned by ToricPolytope.disc(). -PLAYGROUND_MODEL_FACTORIES = [ +TEST_MODELS = [ ( "K3_two_parameter_family", lambda: ToricPolytopeProjectiveSpace([1, 1, 2, 4], model_name="K3_two_parameter_family"), diff --git a/tests/topdata_tests.py b/tests/topdata_tests.py index 94e950f..f85eb59 100644 --- a/tests/topdata_tests.py +++ b/tests/topdata_tests.py @@ -1,22 +1,22 @@ import os import pytest -from sage.all import * # noqa: F401,F403 +from sage.all import * # noqa: F401 from sage.geometry.lattice_polytope import set_palp_dimension load(os.path.join(os.path.dirname(__file__), "..", "sage", "toric_topdata.sage")) -load(os.path.join(os.path.dirname(__file__), "playground_models.sage")) +load(os.path.join(os.path.dirname(__file__), "test_models.sage")) set_palp_dimension(11) -PLAYGROUND_MODELS = [pytest.param(*row[1:], id=row[0]) for row in PLAYGROUND_MODEL_FACTORIES] # noqa: F821 +TEST_MODELS_PARAMETRISED = [pytest.param(*row[1:], id=row[0]) for row in TEST_MODELS] @pytest.mark.parametrize( "make_model, expected_cy_dimension, expected_no_divs, expected_disc, expected_intersection_numbers_CY", - PLAYGROUND_MODELS, + TEST_MODELS_PARAMETRISED, ) -def test_playground_models_disc_and_topdata( +def test_topdata_and_disc( make_model, expected_cy_dimension, expected_no_divs,