Skip to content

Commit 28956ba

Browse files
committed
sage.rings.padics.padic_lattice_element_test: new pytests
Move some of the TestSuite() tests from a TESTS block to pytest. These are slow, and not really meant for end-user consumption, so are more appropriate here.
1 parent f114a57 commit 28956ba

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+
import warnings
3+
4+
5+
def test_padic_lattice_element():
6+
r"""
7+
Run the ``TestSuite()`` for some examples that previously
8+
lived in the TESTS:: block of the padic_lattice_element module.
9+
"""
10+
from sage.misc.sage_unittest import TestSuite
11+
from sage.rings.padics.factory import ZpLC, ZpLF, QpLC, QpLF
12+
13+
with warnings.catch_warnings(category=FutureWarning):
14+
warnings.filterwarnings("ignore", category=FutureWarning)
15+
# These all raise FutureWarnings
16+
R1 = ZpLC(2)
17+
R2 = ZpLF(2)
18+
R3 = QpLC(2)
19+
R4 = QpLF(2)
20+
21+
for R in (R1, R2, R3, R4):
22+
# Only do a few runs, _test_matrix_smith() in particular is
23+
# sloooooow.
24+
TestSuite(R).run(verbose=True,
25+
raise_on_failure=True,
26+
skip="_test_teichmuller",
27+
max_runs=8)

0 commit comments

Comments
 (0)