Skip to content

Commit b7a9a68

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 b7a9a68

File tree

1 file changed

+26
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)