10000 TST: Mark slow tests [f2py] · numpy/numpy@64f4fd2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 64f4fd2

Browse files
committed
TST: Mark slow tests [f2py]
Should finish in around a minute now
1 parent 63cbffb commit 64f4fd2

18 files changed

+27
-3
lines changed

numpy/f2py/tests/test_abstract_interface.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88

99
@pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess")
10+
@pytest.mark.slow
1011
class TestAbstractInterface(util.F2PyTest):
1112
sources = [util.getpath("tests", "src", "abstract_interface", "foo.f90")]
1213

numpy/f2py/tests/test_block_docstring.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from numpy.testing import IS_PYPY
66

77

8+
@pytest.mark.slow
89
class TestBlockDocString(util.F2PyTest):
910
sources = [util.getpath("tests", "src", "block_docstring", "foo.f")]
1011

numpy/f2py/tests/test_callback.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class TestF77Callback(util.F2PyTest):
1515
sources = [util.getpath("tests", "src", "callback", "foo.f")]
1616

1717
@pytest.mark.parametrize("name", "t,t2".split(","))
18+
@pytest.mark.slow
1819
def test_all(self, name):
1920
self.check_function(name)
2021

@@ -205,6 +206,7 @@ class TestF77CallbackPythonTLS(TestF77Callback):
205206
class TestF90Callback(util.F2PyTest):
206207
sources = [util.getpath("tests", "src", "callback", "gh17797.f90")]
207208

209+
@pytest.mark.slow
208210
def test_gh17797(self):
209211
def incr(x):
210212
return x + 123
@@ -222,6 +224,7 @@ class TestGH18335(util.F2PyTest):
222224
"""
223225
sources = [util.getpath("tests", "src", "callback", "gh18335.f90")]
224226

227+
@pytest.mark.slow
225228
def test_gh18335(self):
226229
def foo(x):
227230
x[0] += 1
@@ -235,7 +238,7 @@ class TestGH25211(util.F2PyTest):
235238
util.getpath("tests", "src", "callback", "gh25211.pyf")]
236239
module_name = "callback2"
237240

238-
def test_gh18335(self):
241+
def test_gh25211(self):
239242
def bar(x):
240243
return x*x
241244

numpy/f2py/tests/test_character.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from numpy.f2py.tests import util
66

77

8+
@pytest.mark.slow
89
class TestCharacterString(util.F2PyTest):
910
# options = ['--debug-capi', '--build-dir', '/tmp/test-build-f2py']
1011
suffix = '.f90'
@@ -512,6 +513,7 @@ class TestMiscCharacter(util.F2PyTest):
512513
end subroutine {fprefix}_character_bc_old
513514
""")
514515

516+
@pytest.mark.slow
515517
def test_gh18684(self):
516518
# Test character(len=5) and character*5 usages
517519
f = getattr(self.module, self.fprefix + '_gh18684')
@@ -596,6 +598,7 @@ class TestStringAssumedLength(util.F2PyTest):
596598
def test_gh24008(self):
597599
self.module.greet("joe", "bob")
598600

601+
@pytest.mark.slow
599602
class TestStringOptionalInOut(util.F2PyTest):
600603
sources = [util.getpath("tests", "src", "string", "gh24662.f90")]
601604

numpy/f2py/tests/test_crackfortran.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ class TestDimSpec(util.F2PyTest):
210210
)
211211

212212
@pytest.mark.parametrize("dimspec", all_dimspecs)
213+
@pytest.mark.slow
213214
def test_array_size(self, dimspec):
214215

215216
count = self.all_dimspecs.index(dimspec)
@@ -276,6 +277,7 @@ def test_input_encoding(self, tmp_path, encoding):
276277
assert mod[0]['name'] == 'foo'
277278

278279

280+
@pytest.mark.slow
279281
class TestUnicodeComment(util.F2PyTest):
280282
sources = [util.getpath("tests", "src", "crackfortran", "unicode_comment.f90")]
281283

@@ -327,6 +329,7 @@ def test_nameargspattern_backtracking(self, adversary):
327329
class TestFunctionReturn(util.F2PyTest):
328330
sources = [util.getpath("tests", "src", "crackfortran", "gh23598.f90")]
329331

332+
@pytest.mark.slow
330333
def test_function_rettype(self):
331334
# gh-23598
332335
assert self.module.intproduct(3, 4) == 12

numpy/f2py/tests/test_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class TestData(util.F2PyTest):
1010
sources = [util.getpath("tests", "src", "crackfortran", "data_stmts.f90")]
1111

1212
# For gh-23276
13+
@pytest.mark.slow
1314
def test_data_stmts(self):
1415
assert self.module.cmplxdat.i == 2
1516
assert self.module.cmplxdat.j == 3

numpy/f2py/tests/test_docs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def get_docdir():
1919
def _path(*args):
2020
return get_docdir().joinpath(*args)
2121

22+
@pytest.mark.slow
2223
class TestDocAdvanced(util.F2PyTest):
2324
# options = ['--debug-capi', '--build-dir', '/tmp/build-f2py']
2425
sources = [_path('asterisk1.f90'), _path('asterisk2.f90'),

numpy/f2py/tests/test_f2cmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class TestF2Cmap(util.F2PyTest):
88
]
99

1010
# gh-15095
11-
def test_long_long_map(self):
11+
def test_gh15095(self):
1212
inp = np.ones(3)
1313
out = self.module.func1(inp)
1414
exp_out = 3

numpy/f2py/tests/test_isoc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
from . import util
22
import numpy as np
3+
import pytest
34

45
class TestISOC(util.F2PyTest):
56
sources = [
67
util.getpath("tests", "src", "isocintrin", "isoCtests.f90"),
78
]
89

910
# gh-24553
11+
@pytest.mark.slow
1012
def test_c_double(self):
1113
out = self.module.coddity.c_add(1, 2)
1214
exp_out = 3

numpy/f2py/tests/test_mixed.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class TestMixed(util.F2PyTest):
1313
util.getpath("tests", "src", "mixed", "foo_free.f90"),
1414
]
1515

16+
@pytest.mark.slow
1617
def test_all(self):
1718
assert self.module.bar11() == 11
1819
assert self.module.foo_fixed.bar12() == 12

numpy/f2py/tests/test_module_doc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from numpy.testing import IS_PYPY
88

99

10+
@pytest.mark.slow
1011
class TestModuleDocString(util.F2PyTest):
1112
sources = [
1213
util.getpath("tests", "src", "module_data",

numpy/f2py/tests/test_quoted_character.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ class TestQuotedCharacter(util.F2PyTest):
1212

1313
@pytest.mark.skipif(sys.platform == "win32",
1414
reason="Fails with MinGW64 Gfortran (Issue #9673)")
15+
@pytest.mark.slow
1516
def test_quoted_character(self):
1617
assert self.module.foo() == (b"'", b'"', b";", b"!", b"(", b")")

numpy/f2py/tests/test_return_character.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
IS_S390X = platform.machine() == "s390x"
88

99

10+
@pytest.mark.slow
1011
class TestReturnCharacter(util.F2PyTest):
1112
def check_function(self, t, tname):
1213
if tname in ["t0", "t1", "s0", "s1"]:

numpy/f2py/tests/test_return_complex.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from . import util
55

66

7+
@pytest.mark.slow
78
class TestReturnComplex(util.F2PyTest):
89
def check_function(self, t, tname):
910
if tname in ["t0", "t8", "s0", "s8"]:

numpy/f2py/tests/test_return_integer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from . import util
55

66

7+
@pytest.mark.slow
78
class TestReturnInteger(util.F2PyTest):
89
def check_function(self, t, tname):
910
assert t(123) == 123

numpy/f2py/tests/test_return_real.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from . import util
77

88

9+
@pytest.mark.slow
910
class TestReturnReal(util.F2PyTest):
1011
def check_function(self, t, tname):
1112
if tname in ["t0", "t4", "s0", "s4"]:

numpy/f2py/tests/test_semicolon_split.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def test_multiline(self):
4747
np.dtype(np.intp).itemsize < 8,
4848
reason="32-bit builds are buggy"
4949
)
50+
@pytest.mark.slow
5051
class TestCallstatement(util.F2PyTest):
5152
suffix = ".pyf"
5253
module_name = "callstatement"

numpy/f2py/tests/test_value_attrspec.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ class TestValueAttr(util.F2PyTest):
77
sources = [util.getpath("tests", "src", "value_attrspec", "gh21665.f90")]
88

99
# gh-21665
10-
def test_long 5263 _long_map(self):
10+
@pytest.mark.slow
11+
def test_gh21665(self):
1112
inp = 2
1213
out = self.module.fortfuncs.square(inp)
1314
exp_out = 4

0 commit comments

Comments
 (0)
0