diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-04-04 10:33:07 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2018-04-06 18:20:56 -0600 |
commit | 7bf0564f87511d9e7b6287b3eec0857d0d7742df (patch) | |
tree | 0f61ebbad4144e802a8966015741b2d309be696e /numpy/f2py/tests | |
parent | 036151143bff1eebeded5582534e676a192352cd (diff) | |
download | numpy-7bf0564f87511d9e7b6287b3eec0857d0d7742df.tar.gz |
MAINT: Remove all uses of run_module_suite.
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
Diffstat (limited to 'numpy/f2py/tests')
-rw-r--r-- | numpy/f2py/tests/test_array_from_pyobj.py | 10 | ||||
-rw-r--r-- | numpy/f2py/tests/test_assumed_shape.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_block_docstring.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_callback.py | 6 | ||||
-rw-r--r-- | numpy/f2py/tests/test_common.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_kind.py | 7 | ||||
-rw-r--r-- | numpy/f2py/tests/test_mixed.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_parameter.py | 6 | ||||
-rw-r--r-- | numpy/f2py/tests/test_quoted_character.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_regression.py | 6 | ||||
-rw-r--r-- | numpy/f2py/tests/test_return_character.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_return_complex.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_return_integer.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_return_logical.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_return_real.py | 6 | ||||
-rw-r--r-- | numpy/f2py/tests/test_size.py | 5 | ||||
-rw-r--r-- | numpy/f2py/tests/test_string.py | 5 |
17 files changed, 19 insertions, 77 deletions
diff --git a/numpy/f2py/tests/test_array_from_pyobj.py b/numpy/f2py/tests/test_array_from_pyobj.py index cd6149c9a..8b021491f 100644 --- a/numpy/f2py/tests/test_array_from_pyobj.py +++ b/numpy/f2py/tests/test_array_from_pyobj.py @@ -7,10 +7,8 @@ import copy from numpy import ( array, alltrue, ndarray, zeros, dtype, intp, clongdouble -) -from numpy.testing import ( - run_module_suite, assert_, assert_equal, SkipTest -) + ) +from numpy.testing import assert_, assert_equal, SkipTest from numpy.core.multiarray import typeinfo from . import util @@ -584,7 +582,3 @@ class TestGen_%s(_test_shared_memory): self.type = Type(%r) array = lambda self,dims,intent,obj: Array(Type(%r),dims,intent,obj) ''' % (t, t, t)) - -if __name__ == "__main__": - setup_module() - run_module_suite() diff --git a/numpy/f2py/tests/test_assumed_shape.py b/numpy/f2py/tests/test_assumed_shape.py index b6fde20e4..460afd68d 100644 --- a/numpy/f2py/tests/test_assumed_shape.py +++ b/numpy/f2py/tests/test_assumed_shape.py @@ -3,7 +3,7 @@ from __future__ import division, absolute_import, print_function import os import pytest -from numpy.testing import run_module_suite, assert_ +from numpy.testing import assert_ from . import util @@ -31,6 +31,3 @@ class TestAssumedShapeSumExample(util.F2PyTest): assert_(r == 3, repr(r)) r = self.module.mod.fsum([1, 2]) assert_(r == 3, repr(r)) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_block_docstring.py b/numpy/f2py/tests/test_block_docstring.py index c820895c5..b2981aa82 100644 --- a/numpy/f2py/tests/test_block_docstring.py +++ b/numpy/f2py/tests/test_block_docstring.py @@ -5,7 +5,7 @@ import sys import pytest from . import util -from numpy.testing import run_module_suite, assert_equal +from numpy.testing import assert_equal class TestBlockDocString(util.F2PyTest): code = """ @@ -22,6 +22,3 @@ class TestBlockDocString(util.F2PyTest): def test_block_docstring(self): expected = "'i'-array(2,3)\n" assert_equal(self.module.block.__doc__, expected) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_callback.py b/numpy/f2py/tests/test_callback.py index 19aa4dd6e..4e74947b0 100644 --- a/numpy/f2py/tests/test_callback.py +++ b/numpy/f2py/tests/test_callback.py @@ -6,7 +6,7 @@ import sys import pytest import numpy as np -from numpy.testing import run_module_suite, assert_, assert_equal +from numpy.testing import assert_, assert_equal from . import util @@ -163,7 +163,3 @@ cf2py intent(out) a f = getattr(self.module, 'string_callback_array') res = f(callback, cu, len(cu)) assert_(res == 0, repr(res)) - - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_common.py b/numpy/f2py/tests/test_common.py index 30640f8e9..dcb01b0ec 100644 --- a/numpy/f2py/tests/test_common.py +++ b/numpy/f2py/tests/test_common.py @@ -7,7 +7,7 @@ import pytest import numpy as np from . import util -from numpy.testing import run_module_suite, assert_array_equal +from numpy.testing import assert_array_equal def _path(*a): return os.path.join(*((os.path.dirname(__file__),) + a)) @@ -25,6 +25,3 @@ class TestCommonBlock(util.F2PyTest): np.array('2', dtype='|S1')) assert_array_equal(self.module.block.ok, np.array(3, dtype=np.int32)) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_kind.py b/numpy/f2py/tests/test_kind.py index 61c39a092..1f7762a80 100644 --- a/numpy/f2py/tests/test_kind.py +++ b/numpy/f2py/tests/test_kind.py @@ -3,11 +3,11 @@ from __future__ import division, absolute_import, print_function import os import pytest -from numpy.testing import run_module_suite, assert_ +from numpy.testing import assert_ from numpy.f2py.crackfortran import ( _selected_int_kind_func as selected_int_kind, _selected_real_kind_func as selected_real_kind -) + ) from . import util @@ -32,6 +32,3 @@ class TestKind(util.F2PyTest): assert_(selectedrealkind(i) in [selected_real_kind(i), -1], 'selectedrealkind(%s): expected %r but got %r' % (i, selected_real_kind(i), selectedrealkind(i))) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_mixed.py b/numpy/f2py/tests/test_mixed.py index e6eea8c4f..28268ecc0 100644 --- a/numpy/f2py/tests/test_mixed.py +++ b/numpy/f2py/tests/test_mixed.py @@ -4,7 +4,7 @@ import os import textwrap import pytest -from numpy.testing import run_module_suite, assert_, assert_equal +from numpy.testing import assert_, assert_equal from . import util @@ -36,6 +36,3 @@ class TestMixed(util.F2PyTest): """ assert_equal(self.module.bar11.__doc__, textwrap.dedent(expected).lstrip()) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_parameter.py b/numpy/f2py/tests/test_parameter.py index 11132475e..a0bbd9460 100644 --- a/numpy/f2py/tests/test_parameter.py +++ b/numpy/f2py/tests/test_parameter.py @@ -5,7 +5,7 @@ import math import pytest import numpy as np -from numpy.testing import run_module_suite, assert_raises, assert_equal +from numpy.testing import assert_raises, assert_equal from . import util @@ -117,7 +117,3 @@ class TestParameters(util.F2PyTest): x = np.arange(3, dtype=np.float64) self.module.foo_sum(x) assert_equal(x, [0 + 1*3*3 + 2*3*3, 1*3, 2*3]) - - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_quoted_character.py b/numpy/f2py/tests/test_quoted_character.py index 748a17a38..09fc7328f 100644 --- a/numpy/f2py/tests/test_quoted_character.py +++ b/numpy/f2py/tests/test_quoted_character.py @@ -3,7 +3,7 @@ from __future__ import division, absolute_import, print_function import sys import pytest -from numpy.testing import run_module_suite, assert_equal +from numpy.testing import assert_equal from . import util class TestQuotedCharacter(util.F2PyTest): @@ -28,6 +28,3 @@ Cf2py intent(out) OUT1, OUT2, OUT3, OUT4, OUT5, OUT6 reason='Fails with MinGW64 Gfortran (Issue #9673)') def test_quoted_character(self): assert_equal(self.module.foo(), (b"'", b'"', b';', b'!', b'(', b')')) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_regression.py b/numpy/f2py/tests/test_regression.py index a70d2c93f..d695de61b 100644 --- a/numpy/f2py/tests/test_regression.py +++ b/numpy/f2py/tests/test_regression.py @@ -5,7 +5,7 @@ import math import pytest import numpy as np -from numpy.testing import run_module_suite, assert_raises, assert_equal +from numpy.testing import assert_raises, assert_equal from . import util @@ -28,7 +28,3 @@ class TestIntentInOut(util.F2PyTest): x = np.arange(3, dtype=np.float32) self.module.foo(x) assert_equal(x, [3, 1, 2]) - - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_return_character.py b/numpy/f2py/tests/test_return_character.py index ec2d02658..4a94c5b98 100644 --- a/numpy/f2py/tests/test_return_character.py +++ b/numpy/f2py/tests/test_return_character.py @@ -3,7 +3,7 @@ from __future__ import division, absolute_import, print_function import pytest from numpy import array -from numpy.testing import run_module_suite, assert_ +from numpy.testing import assert_ from . import util @@ -144,6 +144,3 @@ end module f90_return_char def test_all(self): for name in "t0,t1,t5,ts,s0,s1,s5,ss".split(","): self.check_function(getattr(self.module.f90_return_char, name)) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_return_complex.py b/numpy/f2py/tests/test_return_complex.py index 72c00afeb..152cfc960 100644 --- a/numpy/f2py/tests/test_return_complex.py +++ b/numpy/f2py/tests/test_return_complex.py @@ -4,7 +4,7 @@ import pytest from numpy import array from numpy.compat import long -from numpy.testing import run_module_suite, assert_, assert_raises +from numpy.testing import assert_, assert_raises from . import util @@ -167,6 +167,3 @@ end module f90_return_complex def test_all(self): for name in "t0,t8,t16,td,s0,s8,s16,sd".split(","): self.check_function(getattr(self.module.f90_return_complex, name)) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_return_integer.py b/numpy/f2py/tests/test_return_integer.py index befc515a2..7a4b07c4f 100644 --- a/numpy/f2py/tests/test_return_integer.py +++ b/numpy/f2py/tests/test_return_integer.py @@ -4,7 +4,7 @@ import pytest from numpy import array from numpy.compat import long -from numpy.testing import run_module_suite, assert_, assert_raises +from numpy.testing import assert_, assert_raises from . import util @@ -177,6 +177,3 @@ end module f90_return_integer def test_all(self): for name in "t0,t1,t2,t4,t8,s0,s1,s2,s4,s8".split(","): self.check_function(getattr(self.module.f90_return_integer, name)) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_return_logical.py b/numpy/f2py/tests/test_return_logical.py index 917cc3f60..403f4e205 100644 --- a/numpy/f2py/tests/test_return_logical.py +++ b/numpy/f2py/tests/test_return_logical.py @@ -4,7 +4,7 @@ import pytest from numpy import array from numpy.compat import long -from numpy.testing import run_module_suite, assert_, assert_raises +from numpy.testing import assert_, assert_raises from . import util @@ -186,6 +186,3 @@ end module f90_return_logical def test_all(self): for name in "t0,t1,t2,t4,t8,s0,s1,s2,s4,s8".split(","): self.check_function(getattr(self.module.f90_return_logical, name)) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_return_real.py b/numpy/f2py/tests/test_return_real.py index addbdcf49..fcb13e1e0 100644 --- a/numpy/f2py/tests/test_return_real.py +++ b/numpy/f2py/tests/test_return_real.py @@ -4,7 +4,7 @@ import pytest from numpy import array from numpy.compat import long -from numpy.testing import run_module_suite, assert_, assert_raises +from numpy.testing import assert_, assert_raises from . import util @@ -202,7 +202,3 @@ end module f90_return_real def test_all(self): for name in "t0,t4,t8,td,s0,s4,s8,sd".split(","): self.check_function(getattr(self.module.f90_return_real, name)) - - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_size.py b/numpy/f2py/tests/test_size.py index 59de9a64e..e2af61804 100644 --- a/numpy/f2py/tests/test_size.py +++ b/numpy/f2py/tests/test_size.py @@ -3,7 +3,7 @@ from __future__ import division, absolute_import, print_function import os import pytest -from numpy.testing import run_module_suite, assert_equal +from numpy.testing import assert_equal from . import util @@ -49,6 +49,3 @@ class TestSizeSumExample(util.F2PyTest): r = self.module.flatten([[1, 2, 3], [4, 5, 6]]) assert_equal(r, [1, 2, 3, 4, 5, 6], repr(r)) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/f2py/tests/test_string.py b/numpy/f2py/tests/test_string.py index 79eeca1e9..0493c99cf 100644 --- a/numpy/f2py/tests/test_string.py +++ b/numpy/f2py/tests/test_string.py @@ -3,7 +3,7 @@ from __future__ import division, absolute_import, print_function import os import pytest -from numpy.testing import run_module_suite, assert_array_equal +from numpy.testing import assert_array_equal import numpy as np from . import util @@ -22,6 +22,3 @@ class TestString(util.F2PyTest): expected = strings.copy() expected[1, :] = 'AAA' assert_array_equal(out, expected) - -if __name__ == "__main__": - run_module_suite() |