This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from sage.all import * # noqa: F401,F403
|
||||
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"))
|
||||
|
||||
set_palp_dimension(11)
|
||||
|
||||
PLAYGROUND_MODELS = [pytest.param(*row[1:], id=row[0]) for row in PLAYGROUND_MODEL_FACTORIES] # noqa: F821
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"make_model, expected_cy_dimension, expected_no_divs, expected_disc, expected_intersection_numbers_CY",
|
||||
PLAYGROUND_MODELS,
|
||||
)
|
||||
def test_playground_models_disc_and_topdata(
|
||||
make_model,
|
||||
expected_cy_dimension,
|
||||
expected_no_divs,
|
||||
expected_disc,
|
||||
expected_intersection_numbers_CY,
|
||||
):
|
||||
polytope = make_model()
|
||||
|
||||
discriminants = polytope.disc()
|
||||
assert [(str(factor), codim) for factor, codim in discriminants] == expected_disc
|
||||
|
||||
polytope.topdata()
|
||||
assert polytope.cy_dimension == expected_cy_dimension
|
||||
assert polytope.no_divs == expected_no_divs
|
||||
assert polytope.intersection_numbers_CY == expected_intersection_numbers_CY
|
||||
Reference in New Issue
Block a user