5 pipeline with unit tests #10

Merged
julian merged 14 commits from 5-pipeline-with-unit-tests into master 2026-07-29 20:01:58 +02:00
3 changed files with 7 additions and 7 deletions
Showing only changes of commit 91360457a4 - Show all commits
+1 -1
View File
@@ -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"]
@@ -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"),
+5 -5
View File
@@ -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,