diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2020-01-05 00:53:30 -0500 |
---|---|---|
committer | Warren Weckesser <warren.weckesser@gmail.com> | 2020-01-05 00:53:30 -0500 |
commit | c31cc36a8a814ed4844a2a553454185601914a5a (patch) | |
tree | adb28a762dc0985eed669db75b564b3f5c3bfbcc /numpy/tests | |
parent | c1f1bc9ce8e4e2936e80d9bfafc3d8e03237a84b (diff) | |
download | numpy-c31cc36a8a814ed4844a2a553454185601914a5a.tar.gz |
MAINT: Remove implicit inheritance from object class (#15236)
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
Diffstat (limited to 'numpy/tests')
-rw-r--r-- | numpy/tests/test_ctypeslib.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/tests/test_ctypeslib.py b/numpy/tests/test_ctypeslib.py index 5e19f06ce..af3730df1 100644 --- a/numpy/tests/test_ctypeslib.py +++ b/numpy/tests/test_ctypeslib.py @@ -35,7 +35,7 @@ else: reason="ctypes not available in this python") @pytest.mark.skipif(sys.platform == 'cygwin', reason="Known to fail on cygwin") -class TestLoadLibrary(object): +class TestLoadLibrary: def test_basic(self): try: # Should succeed @@ -61,7 +61,7 @@ class TestLoadLibrary(object): print(msg) -class TestNdpointer(object): +class TestNdpointer: def test_dtype(self): dt = np.intc p = ndpointer(dtype=dt) @@ -128,7 +128,7 @@ class TestNdpointer(object): @pytest.mark.skipif(ctypes is None, reason="ctypes not available on this python installation") -class TestNdpointerCFunc(object): +class TestNdpointerCFunc: def test_arguments(self): """ Test that arguments are coerced from arrays """ c_forward_pointer.restype = ctypes.c_void_p @@ -184,7 +184,7 @@ class TestNdpointerCFunc(object): @pytest.mark.skipif(ctypes is None, reason="ctypes not available on this python installation") -class TestAsArray(object): +class TestAsArray: def test_array(self): from ctypes import c_int @@ -275,7 +275,7 @@ class TestAsArray(object): @pytest.mark.skipif(ctypes is None, reason="ctypes not available on this python installation") -class TestAsCtypesType(object): +class TestAsCtypesType: """ Test conversion from dtypes to ctypes types """ def test_scalar(self): dt = np.dtype('<u2') |