|
1 | 1 | import pytest
|
| 2 | +from sage.rings.padics.factory import ZpLC, ZpLF, QpLC, QpLF |
| 3 | + |
| 4 | +# ZpLC, ZpLF, QpLC, and QpLF all raise FutureWarnings |
| 5 | +from warnings import catch_warnings, filterwarnings |
| 6 | +filterwarnings("ignore", category=FutureWarning) |
2 | 7 |
|
3 | 8 |
|
4 | 9 | @pytest.fixture
|
5 | 10 | def R1():
|
6 |
| - from warnings import catch_warnings, filterwarnings |
7 |
| - from sage.rings.padics.factory import ZpLC |
8 |
| - with catch_warnings(category=FutureWarning): |
9 |
| - filterwarnings("ignore", category=FutureWarning) |
10 |
| - return ZpLC(2) |
| 11 | + return ZpLC(2) |
11 | 12 |
|
12 | 13 |
|
13 | 14 | @pytest.fixture
|
14 | 15 | def R2():
|
15 |
| - from warnings import catch_warnings, filterwarnings |
16 |
| - from sage.rings.padics.factory import ZpLF |
17 |
| - with catch_warnings(category=FutureWarning): |
18 |
| - filterwarnings("ignore", category=FutureWarning) |
19 |
| - return ZpLF(2) |
| 16 | + return ZpLF(2) |
20 | 17 |
|
21 | 18 |
|
22 | 19 | @pytest.fixture
|
23 | 20 | def R3():
|
24 |
| - from warnings import catch_warnings, filterwarnings |
25 |
| - from sage.rings.padics.factory import QpLC |
26 |
| - with catch_warnings(category=FutureWarning): |
27 |
| - filterwarnings("ignore", category=FutureWarning) |
28 |
| - return QpLC(2) |
| 21 | + return QpLC(2) |
29 | 22 |
|
30 | 23 |
|
31 | 24 | @pytest.fixture
|
32 | 25 | def R4():
|
33 |
| - from warnings import catch_warnings, filterwarnings |
34 |
| - from sage.rings.padics.factory import QpLF |
35 |
| - with catch_warnings(category=FutureWarning): |
36 |
| - filterwarnings("ignore", category=FutureWarning) |
37 |
| - return QpLF(2) |
| 26 | + return QpLF(2) |
38 | 27 |
|
39 | 28 |
|
40 | 29 | # Use strings for the fixture names here, and then later convert them
|
|
0 commit comments