Updating lint stuff
This commit is contained in:
+1
-1
@@ -14,4 +14,4 @@ ignore = [
|
|||||||
"*.sage.py" = ["F403", "F405", "F821", "E741", "E402", "E702", "I001", "W291", "W293", "W292"]
|
"*.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.
|
# 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
|
# expected_intersection_numbers_CY), where expected_disc is a list of
|
||||||
# (str(discriminant_factor), codimension) pairs as returned by ToricPolytope.disc().
|
# (str(discriminant_factor), codimension) pairs as returned by ToricPolytope.disc().
|
||||||
|
|
||||||
PLAYGROUND_MODEL_FACTORIES = [
|
TEST_MODELS = [
|
||||||
(
|
(
|
||||||
"K3_two_parameter_family",
|
"K3_two_parameter_family",
|
||||||
lambda: ToricPolytopeProjectiveSpace([1, 1, 2, 4], model_name="K3_two_parameter_family"),
|
lambda: ToricPolytopeProjectiveSpace([1, 1, 2, 4], model_name="K3_two_parameter_family"),
|
||||||
@@ -1,22 +1,22 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from sage.all import * # noqa: F401,F403
|
from sage.all import * # noqa: F401
|
||||||
from sage.geometry.lattice_polytope import set_palp_dimension
|
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__), "..", "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)
|
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(
|
@pytest.mark.parametrize(
|
||||||
"make_model, expected_cy_dimension, expected_no_divs, expected_disc, expected_intersection_numbers_CY",
|
"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,
|
make_model,
|
||||||
expected_cy_dimension,
|
expected_cy_dimension,
|
||||||
expected_no_divs,
|
expected_no_divs,
|
||||||
|
|||||||
Reference in New Issue
Block a user