diff options
Diffstat (limited to 'numpy/distutils/tests')
-rw-r--r-- | numpy/distutils/tests/f2py_ext/setup.py | 4 | ||||
-rw-r--r-- | numpy/distutils/tests/f2py_ext/tests/test_fib2.py | 2 | ||||
-rw-r--r-- | numpy/distutils/tests/f2py_f90_ext/setup.py | 2 | ||||
-rw-r--r-- | numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py | 2 | ||||
-rw-r--r-- | numpy/distutils/tests/gen_ext/setup.py | 6 | ||||
-rw-r--r-- | numpy/distutils/tests/gen_ext/tests/test_fib3.py | 2 | ||||
-rw-r--r-- | numpy/distutils/tests/pyrex_ext/setup.py | 2 | ||||
-rw-r--r-- | numpy/distutils/tests/setup.py | 2 | ||||
-rw-r--r-- | numpy/distutils/tests/swig_ext/setup.py | 6 | ||||
-rw-r--r-- | numpy/distutils/tests/swig_ext/tests/test_example.py | 6 | ||||
-rw-r--r-- | numpy/distutils/tests/test_misc_util.py | 58 |
11 files changed, 46 insertions, 46 deletions
diff --git a/numpy/distutils/tests/f2py_ext/setup.py b/numpy/distutils/tests/f2py_ext/setup.py index 658b01bb6..bb7d4bc1c 100644 --- a/numpy/distutils/tests/f2py_ext/setup.py +++ b/numpy/distutils/tests/f2py_ext/setup.py @@ -3,8 +3,8 @@ 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 = Configuration('f2py_ext', parent_package, top_path) + config.add_extension('fib2', ['src/fib2.pyf', 'src/fib1.f']) config.add_data_dir('tests') return config diff --git a/numpy/distutils/tests/f2py_ext/tests/test_fib2.py b/numpy/distutils/tests/f2py_ext/tests/test_fib2.py index bee1b9870..5252db283 100644 --- a/numpy/distutils/tests/f2py_ext/tests/test_fib2.py +++ b/numpy/distutils/tests/f2py_ext/tests/test_fib2.py @@ -7,7 +7,7 @@ from f2py_ext import fib2 class TestFib2(TestCase): def test_fib(self): - assert_array_equal(fib2.fib(6),[0,1,1,2,3,5]) + 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/setup.py b/numpy/distutils/tests/f2py_f90_ext/setup.py index 4b4c2390c..7cca81637 100644 --- a/numpy/distutils/tests/f2py_f90_ext/setup.py +++ b/numpy/distutils/tests/f2py_f90_ext/setup.py @@ -3,7 +3,7 @@ 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 = Configuration('f2py_f90_ext', parent_package, top_path) config.add_extension('foo', ['src/foo_free.f90'], include_dirs=['include'], diff --git a/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py b/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py index 92e559291..9653b9023 100644 --- a/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py +++ b/numpy/distutils/tests/f2py_f90_ext/tests/test_foo.py @@ -6,7 +6,7 @@ from f2py_f90_ext import foo class TestFoo(TestCase): def test_foo_free(self): - assert_equal(foo.foo_free.bar13(),13) + assert_equal(foo.foo_free.bar13(), 13) if __name__ == "__main__": run_module_suite() diff --git a/numpy/distutils/tests/gen_ext/setup.py b/numpy/distutils/tests/gen_ext/setup.py index ccab2a45e..de6b941e0 100644 --- a/numpy/distutils/tests/gen_ext/setup.py +++ b/numpy/distutils/tests/gen_ext/setup.py @@ -28,16 +28,16 @@ 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') + target = os.path.join(build_dir, 'fib3.f') if newer(__file__, target): - f = open(target,'w') + 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 = Configuration('gen_ext', parent_package, top_path) config.add_extension('fib3', [source_func] ) diff --git a/numpy/distutils/tests/gen_ext/tests/test_fib3.py b/numpy/distutils/tests/gen_ext/tests/test_fib3.py index 7bab5a6be..5fd9be439 100644 --- a/numpy/distutils/tests/gen_ext/tests/test_fib3.py +++ b/numpy/distutils/tests/gen_ext/tests/test_fib3.py @@ -6,7 +6,7 @@ from gen_ext import fib3 class TestFib3(TestCase): def test_fib(self): - assert_array_equal(fib3.fib(6),[0,1,1,2,3,5]) + assert_array_equal(fib3.fib(6), [0, 1, 1, 2, 3, 5]) if __name__ == "__main__": run_module_suite() diff --git a/numpy/distutils/tests/pyrex_ext/setup.py b/numpy/distutils/tests/pyrex_ext/setup.py index ad1f5207a..819dd3154 100644 --- a/numpy/distutils/tests/pyrex_ext/setup.py +++ b/numpy/distutils/tests/pyrex_ext/setup.py @@ -3,7 +3,7 @@ from __future__ import division, print_function def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration - config = Configuration('pyrex_ext',parent_package,top_path) + config = Configuration('pyrex_ext', parent_package, top_path) config.add_extension('primes', ['primes.pyx']) config.add_data_dir('tests') diff --git a/numpy/distutils/tests/setup.py b/numpy/distutils/tests/setup.py index 61f6ba751..135de7c47 100644 --- a/numpy/distutils/tests/setup.py +++ b/numpy/distutils/tests/setup.py @@ -3,7 +3,7 @@ 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 = Configuration('testnumpydistutils', parent_package, top_path) config.add_subpackage('pyrex_ext') config.add_subpackage('f2py_ext') #config.add_subpackage('f2py_f90_ext') diff --git a/numpy/distutils/tests/swig_ext/setup.py b/numpy/distutils/tests/swig_ext/setup.py index 7ce3061a1..f6e07303b 100644 --- a/numpy/distutils/tests/swig_ext/setup.py +++ b/numpy/distutils/tests/swig_ext/setup.py @@ -3,12 +3,12 @@ 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 = Configuration('swig_ext', parent_package, top_path) config.add_extension('_example', - ['src/example.i','src/example.c'] + ['src/example.i', 'src/example.c'] ) config.add_extension('_example2', - ['src/zoo.i','src/zoo.cc'], + ['src/zoo.i', 'src/zoo.cc'], depends=['src/zoo.h'], include_dirs=['src'] ) diff --git a/numpy/distutils/tests/swig_ext/tests/test_example.py b/numpy/distutils/tests/swig_ext/tests/test_example.py index 3164c0831..e81f98b1d 100644 --- a/numpy/distutils/tests/swig_ext/tests/test_example.py +++ b/numpy/distutils/tests/swig_ext/tests/test_example.py @@ -6,12 +6,12 @@ from swig_ext import example class TestExample(TestCase): def test_fact(self): - assert_equal(example.fact(10),3628800) + assert_equal(example.fact(10), 3628800) def test_cvar(self): - assert_equal(example.cvar.My_variable,3.0) + assert_equal(example.cvar.My_variable, 3.0) example.cvar.My_variable = 5 - assert_equal(example.cvar.My_variable,5.0) + assert_equal(example.cvar.My_variable, 5.0) if __name__ == "__main__": diff --git a/numpy/distutils/tests/test_misc_util.py b/numpy/distutils/tests/test_misc_util.py index 33b6b1213..fd6af638f 100644 --- a/numpy/distutils/tests/test_misc_util.py +++ b/numpy/distutils/tests/test_misc_util.py @@ -11,49 +11,49 @@ ajoin = lambda *paths: join(*((sep,)+paths)) class TestAppendpath(TestCase): def test_1(self): - assert_equal(appendpath('prefix','name'),join('prefix','name')) - assert_equal(appendpath('/prefix','name'),ajoin('prefix','name')) - assert_equal(appendpath('/prefix','/name'),ajoin('prefix','name')) - assert_equal(appendpath('prefix','/name'),join('prefix','name')) + assert_equal(appendpath('prefix', 'name'), join('prefix', 'name')) + assert_equal(appendpath('/prefix', 'name'), ajoin('prefix', 'name')) + assert_equal(appendpath('/prefix', '/name'), ajoin('prefix', 'name')) + assert_equal(appendpath('prefix', '/name'), join('prefix', 'name')) def test_2(self): - assert_equal(appendpath('prefix/sub','name'), - join('prefix','sub','name')) - assert_equal(appendpath('prefix/sub','sup/name'), - join('prefix','sub','sup','name')) - assert_equal(appendpath('/prefix/sub','/prefix/name'), - ajoin('prefix','sub','name')) + assert_equal(appendpath('prefix/sub', 'name'), + join('prefix', 'sub', 'name')) + assert_equal(appendpath('prefix/sub', 'sup/name'), + join('prefix', 'sub', 'sup', 'name')) + assert_equal(appendpath('/prefix/sub', '/prefix/name'), + ajoin('prefix', 'sub', 'name')) def test_3(self): - assert_equal(appendpath('/prefix/sub','/prefix/sup/name'), - ajoin('prefix','sub','sup','name')) - assert_equal(appendpath('/prefix/sub/sub2','/prefix/sup/sup2/name'), - ajoin('prefix','sub','sub2','sup','sup2','name')) - assert_equal(appendpath('/prefix/sub/sub2','/prefix/sub/sup/name'), - ajoin('prefix','sub','sub2','sup','name')) + assert_equal(appendpath('/prefix/sub', '/prefix/sup/name'), + ajoin('prefix', 'sub', 'sup', 'name')) + assert_equal(appendpath('/prefix/sub/sub2', '/prefix/sup/sup2/name'), + ajoin('prefix', 'sub', 'sub2', 'sup', 'sup2', 'name')) + assert_equal(appendpath('/prefix/sub/sub2', '/prefix/sub/sup/name'), + ajoin('prefix', 'sub', 'sub2', 'sup', 'name')) class TestMinrelpath(TestCase): def test_1(self): - n = lambda path: path.replace('/',sep) - assert_equal(minrelpath(n('aa/bb')),n('aa/bb')) - assert_equal(minrelpath('..'),'..') - assert_equal(minrelpath(n('aa/..')),'') - assert_equal(minrelpath(n('aa/../bb')),'bb') - assert_equal(minrelpath(n('aa/bb/..')),'aa') - assert_equal(minrelpath(n('aa/bb/../..')),'') - assert_equal(minrelpath(n('aa/bb/../cc/../dd')),n('aa/dd')) - assert_equal(minrelpath(n('.././..')),n('../..')) - assert_equal(minrelpath(n('aa/bb/.././../dd')),n('dd')) + n = lambda path: path.replace('/', sep) + assert_equal(minrelpath(n('aa/bb')), n('aa/bb')) + assert_equal(minrelpath('..'), '..') + assert_equal(minrelpath(n('aa/..')), '') + assert_equal(minrelpath(n('aa/../bb')), 'bb') + assert_equal(minrelpath(n('aa/bb/..')), 'aa') + assert_equal(minrelpath(n('aa/bb/../..')), '') + assert_equal(minrelpath(n('aa/bb/../cc/../dd')), n('aa/dd')) + assert_equal(minrelpath(n('.././..')), n('../..')) + assert_equal(minrelpath(n('aa/bb/.././../dd')), n('dd')) class TestGpaths(TestCase): def test_gpaths(self): - local_path = minrelpath(join(dirname(__file__),'..')) + local_path = minrelpath(join(dirname(__file__), '..')) ls = gpaths('command/*.py', local_path) - assert_(join(local_path,'command','build_src.py') in ls,repr(ls)) + assert_(join(local_path, 'command', 'build_src.py') in ls, repr(ls)) f = gpaths('system_info.py', local_path) - assert_(join(local_path,'system_info.py')==f[0],repr(f)) + assert_(join(local_path, 'system_info.py')==f[0], repr(f)) class TestSharedExtension(TestCase): |