diff options
author | Ralf Gommers <ralf.gommers@gmail.com> | 2016-01-06 20:33:18 +0100 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@gmail.com> | 2016-01-06 21:58:53 +0100 |
commit | 15fc41f5f9ecb5da72d6bd3a4932aee8a9d78f08 (patch) | |
tree | 8b0aaeea9ee34831b616ea41d909eaf46f66ea05 /numpy | |
parent | 1d1eaef896a66059163f0baaaaa162e1f7c225a9 (diff) | |
download | numpy-15fc41f5f9ecb5da72d6bd3a4932aee8a9d78f08.tar.gz |
MAINT: remove unused f2py and SWIG tests from numpy.distutils.
Diffstat (limited to 'numpy')
25 files changed, 0 insertions, 301 deletions
diff --git a/numpy/distutils/setup.py b/numpy/distutils/setup.py index eac9c0f18..82a53bd08 100644 --- a/numpy/distutils/setup.py +++ b/numpy/distutils/setup.py @@ -6,7 +6,6 @@ def configuration(parent_package='',top_path=None): config = Configuration('distutils', parent_package, top_path) config.add_subpackage('command') config.add_subpackage('fcompiler') - config.add_subpackage('tests') config.add_data_dir('tests') config.add_data_files('site.cfg') config.add_data_files('mingw/gfortran_vs2003_hack.c') diff --git a/numpy/distutils/tests/f2py_ext/__init__.py b/numpy/distutils/tests/f2py_ext/__init__.py deleted file mode 100644 index 1d0f69b67..000000000 --- a/numpy/distutils/tests/f2py_ext/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import division, absolute_import, print_function diff --git a/numpy/distutils/tests/f2py_ext/setup.py b/numpy/distutils/tests/f2py_ext/setup.py deleted file mode 100644 index bb7d4bc1c..000000000 --- a/numpy/distutils/tests/f2py_ext/setup.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python -from __future__ import division, print_function - -def configuration(parent_package='',top_path=None): - from numpy.distutils.misc_util import Configuration - config = Configuration('f2py_ext', parent_package, top_path) - config.add_extension('fib2', ['src/fib2.pyf', 'src/fib1.f']) - config.add_data_dir('tests') - return config - -if __name__ == "__main__": - from numpy.distutils.core import setup - setup(configuration=configuration) diff --git a/numpy/distutils/tests/f2py_ext/src/fib1.f b/numpy/distutils/tests/f2py_ext/src/fib1.f deleted file mode 100644 index cfbb1eea0..000000000 --- a/numpy/distutils/tests/f2py_ext/src/fib1.f +++ /dev/null @@ -1,18 +0,0 @@ -C FILE: FIB1.F - SUBROUTINE FIB(A,N) -C -C CALCULATE FIRST N FIBONACCI NUMBERS -C - INTEGER N - REAL*8 A(N) - DO I=1,N - IF (I.EQ.1) THEN - A(I) = 0.0D0 - ELSEIF (I.EQ.2) THEN - A(I) = 1.0D0 - ELSE - A(I) = A(I-1) + A(I-2) - ENDIF - ENDDO - END -C END FILE FIB1.F diff --git a/numpy/distutils/tests/f2py_ext/src/fib2.pyf b/numpy/distutils/tests/f2py_ext/src/fib2.pyf deleted file mode 100644 index 90a8cf00c..000000000 --- a/numpy/distutils/tests/f2py_ext/src/fib2.pyf +++ /dev/null @@ -1,9 +0,0 @@ -! -*- f90 -*- -python module fib2 - interface - subroutine fib(a,n) - real*8 dimension(n),intent(out),depend(n) :: a - integer intent(in) :: n - end subroutine fib - end interface -end python module fib2 diff --git a/numpy/distutils/tests/f2py_ext/tests/test_fib2.py b/numpy/distutils/tests/f2py_ext/tests/test_fib2.py deleted file mode 100644 index 0e5bab925..000000000 --- a/numpy/distutils/tests/f2py_ext/tests/test_fib2.py +++ /dev/null @@ -1,12 +0,0 @@ -from __future__ import division, absolute_import, print_function - -from numpy.testing import TestCase, run_module_suite, assert_array_equal -from f2py_ext import fib2 - -class TestFib2(TestCase): - - def test_fib(self): - assert_array_equal(fib2.fib(6), [0, 1, 1, 2, 3, 5]) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/distutils/tests/f2py_f90_ext/__init__.py b/numpy/distutils/tests/f2py_f90_ext/__init__.py deleted file mode 100644 index 1d0f69b67..000000000 --- a/numpy/distutils/tests/f2py_f90_ext/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import division, absolute_import, print_function diff --git a/numpy/distutils/tests/f2py_f90_ext/include/body.f90 b/numpy/distutils/tests/f2py_f90_ext/include/body.f90 deleted file mode 100644 index 90b44e29d..000000000 --- a/numpy/distutils/tests/f2py_f90_ext/include/body.f90 +++ /dev/null @@ -1,5 +0,0 @@ - subroutine bar13(a) - !f2py intent(out) a - integer a - a = 13 - end subroutine bar13 diff --git a/numpy/distutils/tests/f2py_f90_ext/setup.py b/numpy/distutils/tests/f2py_f90_ext/setup.py deleted file mode 100644 index 7cca81637..000000000 --- a/numpy/distutils/tests/f2py_f90_ext/setup.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python -from __future__ import division, print_function - -def configuration(parent_package='',top_path=None): - from numpy.distutils.misc_util import Configuration - config = Configuration('f2py_f90_ext', parent_package, top_path) - config.add_extension('foo', - ['src/foo_free.f90'], - include_dirs=['include'], - f2py_options=['--include_paths', - config.paths('include')[0]] - ) - config.add_data_dir('tests') - return config - -if __name__ == "__main__": - from numpy.distutils.core import setup - setup(configuration=configuration) diff --git a/numpy/distutils/tests/f2py_f90_ext/src/foo_free.f90 b/numpy/distutils/tests/f2py_f90_ext/src/foo_free.f90 deleted file mode 100644 index c7713be59..000000000 --- a/numpy/distutils/tests/f2py_f90_ext/src/foo_free.f90 +++ /dev/null @@ -1,6 +0,0 @@ -module foo_free -contains - -include "body.f90" - -end module foo_free diff --git a/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py b/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py deleted file mode 100644 index 499b9ebc3..000000000 --- a/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import division, absolute_import, print_function - -from numpy.testing import TestCase, run_module_suite, assert_equal -from f2py_f90_ext import foo - -class TestFoo(TestCase): - def test_foo_free(self): - assert_equal(foo.foo_free.bar13(), 13) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/distutils/tests/gen_ext/__init__.py b/numpy/distutils/tests/gen_ext/__init__.py deleted file mode 100644 index 1d0f69b67..000000000 --- a/numpy/distutils/tests/gen_ext/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import division, absolute_import, print_function diff --git a/numpy/distutils/tests/gen_ext/setup.py b/numpy/distutils/tests/gen_ext/setup.py deleted file mode 100644 index de6b941e0..000000000 --- a/numpy/distutils/tests/gen_ext/setup.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python -from __future__ import division, print_function - -fib3_f = ''' -C FILE: FIB3.F - SUBROUTINE FIB(A,N) -C -C CALCULATE FIRST N FIBONACCI NUMBERS -C - INTEGER N - REAL*8 A(N) -Cf2py intent(in) n -Cf2py intent(out) a -Cf2py depend(n) a - DO I=1,N - IF (I.EQ.1) THEN - A(I) = 0.0D0 - ELSEIF (I.EQ.2) THEN - A(I) = 1.0D0 - ELSE - A(I) = A(I-1) + A(I-2) - ENDIF - ENDDO - END -C END FILE FIB3.F -''' - -def source_func(ext, build_dir): - import os - from distutils.dep_util import newer - target = os.path.join(build_dir, 'fib3.f') - if newer(__file__, target): - f = open(target, 'w') - f.write(fib3_f) - f.close() - return [target] - -def configuration(parent_package='',top_path=None): - from numpy.distutils.misc_util import Configuration - config = Configuration('gen_ext', parent_package, top_path) - config.add_extension('fib3', - [source_func] - ) - return config - -if __name__ == "__main__": - from numpy.distutils.core import setup - setup(configuration=configuration) diff --git a/numpy/distutils/tests/gen_ext/tests/test_fib3.py b/numpy/distutils/tests/gen_ext/tests/test_fib3.py deleted file mode 100644 index e02ca8103..000000000 --- a/numpy/distutils/tests/gen_ext/tests/test_fib3.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import division, absolute_import, print_function - -from gen_ext import fib3 -from numpy.testing import TestCase, run_module_suite, assert_array_equal - -class TestFib3(TestCase): - def test_fib(self): - assert_array_equal(fib3.fib(6), [0, 1, 1, 2, 3, 5]) - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/distutils/tests/setup.py b/numpy/distutils/tests/setup.py deleted file mode 100644 index 07bafb0b7..000000000 --- a/numpy/distutils/tests/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python -from __future__ import division, print_function - -def configuration(parent_package='',top_path=None): - from numpy.distutils.misc_util import Configuration - config = Configuration('testnumpydistutils', parent_package, top_path) - config.add_subpackage('f2py_ext') - config.add_subpackage('swig_ext') - config.add_subpackage('gen_ext') - return config - -if __name__ == "__main__": - from numpy.distutils.core import setup - setup(configuration=configuration) diff --git a/numpy/distutils/tests/swig_ext/__init__.py b/numpy/distutils/tests/swig_ext/__init__.py deleted file mode 100644 index 1d0f69b67..000000000 --- a/numpy/distutils/tests/swig_ext/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import division, absolute_import, print_function diff --git a/numpy/distutils/tests/swig_ext/setup.py b/numpy/distutils/tests/swig_ext/setup.py deleted file mode 100644 index f6e07303b..000000000 --- a/numpy/distutils/tests/swig_ext/setup.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -from __future__ import division, print_function - -def configuration(parent_package='',top_path=None): - from numpy.distutils.misc_util import Configuration - config = Configuration('swig_ext', parent_package, top_path) - config.add_extension('_example', - ['src/example.i', 'src/example.c'] - ) - config.add_extension('_example2', - ['src/zoo.i', 'src/zoo.cc'], - depends=['src/zoo.h'], - include_dirs=['src'] - ) - config.add_data_dir('tests') - return config - -if __name__ == "__main__": - from numpy.distutils.core import setup - setup(configuration=configuration) diff --git a/numpy/distutils/tests/swig_ext/src/example.c b/numpy/distutils/tests/swig_ext/src/example.c deleted file mode 100644 index be151725c..000000000 --- a/numpy/distutils/tests/swig_ext/src/example.c +++ /dev/null @@ -1,14 +0,0 @@ -/* File : example.c */ - -double My_variable = 3.0; - -/* Compute factorial of n */ -int fact(int n) { - if (n <= 1) return 1; - else return n*fact(n-1); -} - -/* Compute n mod m */ -int my_mod(int n, int m) { - return(n % m); -} diff --git a/numpy/distutils/tests/swig_ext/src/example.i b/numpy/distutils/tests/swig_ext/src/example.i deleted file mode 100644 index f4fc11e66..000000000 --- a/numpy/distutils/tests/swig_ext/src/example.i +++ /dev/null @@ -1,14 +0,0 @@ -/* -*- c -*- */ - -/* File : example.i */ -%module example -%{ -/* Put headers and other declarations here */ -extern double My_variable; -extern int fact(int); -extern int my_mod(int n, int m); -%} - -extern double My_variable; -extern int fact(int); -extern int my_mod(int n, int m); diff --git a/numpy/distutils/tests/swig_ext/src/zoo.cc b/numpy/distutils/tests/swig_ext/src/zoo.cc deleted file mode 100644 index 0a643d1e5..000000000 --- a/numpy/distutils/tests/swig_ext/src/zoo.cc +++ /dev/null @@ -1,23 +0,0 @@ -#include "zoo.h" -#include <cstdio> -#include <cstring> - -Zoo::Zoo() -{ - n = 0; -} - -void Zoo::shut_up(char *animal) -{ - if (n < 10) { - strcpy(animals[n], animal); - n++; - } -} - -void Zoo::display() -{ - int i; - for(i = 0; i < n; i++) - printf("%s\n", animals[i]); -} diff --git a/numpy/distutils/tests/swig_ext/src/zoo.h b/numpy/distutils/tests/swig_ext/src/zoo.h deleted file mode 100644 index cb26e6cef..000000000 --- a/numpy/distutils/tests/swig_ext/src/zoo.h +++ /dev/null @@ -1,9 +0,0 @@ - -class Zoo{ - int n; - char animals[10][50]; -public: - Zoo(); - void shut_up(char *animal); - void display(); -}; diff --git a/numpy/distutils/tests/swig_ext/src/zoo.i b/numpy/distutils/tests/swig_ext/src/zoo.i deleted file mode 100644 index a029c03e8..000000000 --- a/numpy/distutils/tests/swig_ext/src/zoo.i +++ /dev/null @@ -1,10 +0,0 @@ -// -*- c++ -*- -// Example copied from http://linuxgazette.net/issue49/pramode.html - -%module example2 - -%{ -#include "zoo.h" -%} - -%include "zoo.h" diff --git a/numpy/distutils/tests/swig_ext/tests/test_example.py b/numpy/distutils/tests/swig_ext/tests/test_example.py deleted file mode 100644 index 81b82c849..000000000 --- a/numpy/distutils/tests/swig_ext/tests/test_example.py +++ /dev/null @@ -1,17 +0,0 @@ -from __future__ import division, absolute_import, print_function - -from numpy.testing import TestCase, run_module_suite, assert_equal -from swig_ext import example - -class TestExample(TestCase): - def test_fact(self): - assert_equal(example.fact(10), 3628800) - - def test_cvar(self): - assert_equal(example.cvar.My_variable, 3.0) - example.cvar.My_variable = 5 - assert_equal(example.cvar.My_variable, 5.0) - - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/distutils/tests/swig_ext/tests/test_example2.py b/numpy/distutils/tests/swig_ext/tests/test_example2.py deleted file mode 100644 index 381b30d6a..000000000 --- a/numpy/distutils/tests/swig_ext/tests/test_example2.py +++ /dev/null @@ -1,15 +0,0 @@ -from __future__ import division, absolute_import, print_function - -from numpy.testing import TestCase, run_module_suite -from swig_ext import example2 - -class TestExample2(TestCase): - def test_zoo(self): - z = example2.Zoo() - z.shut_up('Tiger') - z.shut_up('Lion') - z.display() - - -if __name__ == "__main__": - run_module_suite() diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py index 23ba8cc3a..e3205837c 100644 --- a/numpy/testing/nosetester.py +++ b/numpy/testing/nosetester.py @@ -167,12 +167,6 @@ class NoseTester(object): want to initialize `NoseTester` objects on behalf of other code. """ - # Stuff to exclude from tests. These are from numpy.distutils - excludes = ['f2py_ext', - 'f2py_f90_ext', - 'gen_ext', - 'swig_ext'] - def __init__(self, package=None, raise_warnings="release", depth=0): # Back-compat: 'None' used to mean either "release" or "develop" # depending on whether this was a release or develop version of @@ -294,9 +288,6 @@ class NoseTester(object): import_nose() # compile argv argv = self._test_argv(label, verbose, extra_argv) - # bypass tests noted for exclude - for ename in self.excludes: - argv += ['--exclude', ename] # our way of doing coverage if coverage: argv += ['--cover-package=%s' % self.package_name, '--with-coverage', |