summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/test_array_from_pyobj.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-07-17 21:11:49 -0600
committerCharles Harris <charlesr.harris@gmail.com>2017-07-24 13:00:29 -0600
commit69bc7b19d2a665c8301c3df07aee61fc469ff4e3 (patch)
treef5c25a7ce2543e169a91a5b5bff3560ccf9ca664 /numpy/f2py/tests/test_array_from_pyobj.py
parentebd1df4ac3021ae86d4ee433fc80ec617cec97a4 (diff)
downloadnumpy-69bc7b19d2a665c8301c3df07aee61fc469ff4e3.tar.gz
TST: Remove unittest dependencies in numpy/f2py/tests.
Diffstat (limited to 'numpy/f2py/tests/test_array_from_pyobj.py')
-rw-r--r--numpy/f2py/tests/test_array_from_pyobj.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/numpy/f2py/tests/test_array_from_pyobj.py b/numpy/f2py/tests/test_array_from_pyobj.py
index 48bb7c0f4..1f6b59462 100644
--- a/numpy/f2py/tests/test_array_from_pyobj.py
+++ b/numpy/f2py/tests/test_array_from_pyobj.py
@@ -17,7 +17,7 @@ import util
wrap = None
-def setup():
+def setup_module():
"""
Build the required testing extension module
@@ -294,7 +294,7 @@ class Array(object):
return obj_attr[0] == self.arr_attr[0]
-class test_intent(unittest.TestCase):
+class TestIntent(object):
def test_in_out(self):
assert_equal(str(intent.in_.out), 'intent(in,out)')
@@ -305,7 +305,7 @@ class test_intent(unittest.TestCase):
assert_(not intent.in_.is_intent('c'))
-class _test_shared_memory:
+class _test_shared_memory(object):
num2seq = [1, 2]
num23seq = [[1, 2, 3], [4, 5, 6]]
@@ -578,14 +578,12 @@ class _test_shared_memory:
for t in _type_names:
exec('''\
-class test_%s_gen(unittest.TestCase,
- _test_shared_memory
- ):
- def setUp(self):
+class TestGen_%s(_test_shared_memory):
+ def setup(self):
self.type = Type(%r)
array = lambda self,dims,intent,obj: Array(Type(%r),dims,intent,obj)
''' % (t, t, t))
if __name__ == "__main__":
- setup()
+ setup_module()
run_module_suite()