This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from sage.all import * # noqa: F401,F403
|
||||
|
||||
load(os.path.join(os.path.dirname(__file__), "..", "sage", "toric_topdata.sage"))
|
||||
|
||||
|
||||
def test_polytope_rejects_too_few_points():
|
||||
with pytest.raises(ValueError):
|
||||
Polytope([[0, 0], [1, 0]]) # 2 points in dimension 2: not enough
|
||||
|
||||
|
||||
def test_mirror_quintic_topdata():
|
||||
# Vertices e_1, ..., e_4, -e_1-...-e_4 -- the worked example from
|
||||
# ToricPolytope's own docstring.
|
||||
points = [
|
||||
[1, 0, 0, 0],
|
||||
[0, 1, 0, 0],
|
||||
[0, 0, 1, 0],
|
||||
[0, 0, 0, 1],
|
||||
[-1, -1, -1, -1],
|
||||
]
|
||||
|
||||
polytope = ToricPolytope(points, model_name="ci_smoke_test_quintic")
|
||||
assert polytope.dimension == 4
|
||||
assert len(polytope.triangulations) >= 1
|
||||
|
||||
polytope.topdata()
|
||||
assert polytope.cy_dimension == 3
|
||||
assert polytope.no_divs == 1 # P^4 has Picard rank 1
|
||||
assert polytope.intersection_numbers_CY == {(0, 0, 0): 5} # classical quintic self-intersection
|
||||
Reference in New Issue
Block a user