Skip to content

Commit 65625c9

Browse files
committed
sage.rings.valuation.mapped_valuation_test: add pytests
Copy two TestSuite() runs from a TESTS:: block to pytest. These are on the verge of hitting the "slow doctest" limit for long tests, and sometimes cause warnings in the CI. But more importantly, they are simply better suited to pytest: the user would never want to run them, and the output is not meaningful as documentation.
1 parent f4adc25 commit 65625c9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import pytest
2+
3+
4+
def test_finite_extension_from_limit_valuation():
5+
r"""
6+
Run the ``TestSuite()`` for two examples given in the
7+
``FiniteExtensionFromLimitValuation`` documentation.
8+
"""
9+
from sage.misc.sage_unittest import TestSuite
10+
from sage.rings.function_field.constructor import FunctionField
11+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
12+
from sage.rings.integer import Integer
13+
from sage.rings.rational_field import QQ
14+
15+
K = FunctionField(QQ, 'x')
16+
x = K.gen()
17+
R = PolynomialRing(K, 'y')
18+
y = R.gen()
19+
L = K.extension(y**2 - x)
20+
v = K.valuation(Integer(1))
21+
w = v.extensions(L)
22+
23+
for ext in w:
24+
# fewer max_runs, these are kind of slow
25+
TestSuite(ext).run(verbose=True,
26+
raise_on_failure=True,
27+
max_runs=512)

0 commit comments

Comments
 (0)