summaryrefslogtreecommitdiff
path: root/numpy/testing
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2022-10-27 14:57:14 +0200
committerSebastian Berg <sebastianb@nvidia.com>2022-10-27 14:57:14 +0200
commit67841947b458f6bdc6c40d014512da9bc4717a3e (patch)
tree9683bb0863ef40219e3de2fb37013cef209a7edb /numpy/testing
parent2283052fd01138863a5741d84f358fdbea501bd9 (diff)
downloadnumpy-67841947b458f6bdc6c40d014512da9bc4717a3e.tar.gz
TST,MAINT: Replace most `setup` with `setup_method` (also teardown)
In some cases, the replacement is clearly not what is intended, in those (where setup was called explicitly), I mostly renamed `setup` to `_setup`. The `test_ccompile_opt` is a bit confusing, so left it right now (this will probably fail)
Diffstat (limited to 'numpy/testing')
-rw-r--r--numpy/testing/tests/test_utils.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/numpy/testing/tests/test_utils.py b/numpy/testing/tests/test_utils.py
index 377f570bd..052cc3aa1 100644
--- a/numpy/testing/tests/test_utils.py
+++ b/numpy/testing/tests/test_utils.py
@@ -65,7 +65,7 @@ class _GenericTest:
class TestArrayEqual(_GenericTest):
- def setup(self):
+ def setup_method(self):
self._assert_func = assert_array_equal
def test_generic_rank1(self):
@@ -299,7 +299,7 @@ class TestBuildErrorMessage:
class TestEqual(TestArrayEqual):
- def setup(self):
+ def setup_method(self):
self._assert_func = assert_equal
def test_nan_items(self):
@@ -394,7 +394,7 @@ class TestEqual(TestArrayEqual):
class TestArrayAlmostEqual(_GenericTest):
- def setup(self):
+ def setup_method(self):
self._assert_func = assert_array_almost_equal
def test_closeness(self):
@@ -492,7 +492,7 @@ class TestArrayAlmostEqual(_GenericTest):
class TestAlmostEqual(_GenericTest):
- def setup(self):
+ def setup_method(self):
self._assert_func = assert_almost_equal
def test_closeness(self):
@@ -643,7 +643,7 @@ class TestAlmostEqual(_GenericTest):
class TestApproxEqual:
- def setup(self):
+ def setup_method(self):
self._assert_func = assert_approx_equal
def test_simple_0d_arrays(self):
@@ -686,7 +686,7 @@ class TestApproxEqual:
class TestArrayAssertLess:
- def setup(self):
+ def setup_method(self):
self._assert_func = assert_array_less
def test_simple_arrays(self):
@@ -796,7 +796,7 @@ class TestArrayAssertLess:
@pytest.mark.skip(reason="The raises decorator depends on Nose")
class TestRaises:
- def setup(self):
+ def setup_method(self):
class MyException(Exception):
pass