summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test__datasource.py
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/lib/tests/test__datasource.py
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/lib/tests/test__datasource.py')
-rw-r--r--numpy/lib/tests/test__datasource.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/numpy/lib/tests/test__datasource.py b/numpy/lib/tests/test__datasource.py
index 2738d41c4..c8149abc3 100644
--- a/numpy/lib/tests/test__datasource.py
+++ b/numpy/lib/tests/test__datasource.py
@@ -87,11 +87,11 @@ def invalid_httpfile():
class TestDataSourceOpen:
- def setup(self):
+ def setup_method(self):
self.tmpdir = mkdtemp()
self.ds = datasource.DataSource(self.tmpdir)
- def teardown(self):
+ def teardown_method(self):
rmtree(self.tmpdir)
del self.ds
@@ -156,11 +156,11 @@ class TestDataSourceOpen:
class TestDataSourceExists:
- def setup(self):
+ def setup_method(self):
self.tmpdir = mkdtemp()
self.ds = datasource.DataSource(self.tmpdir)
- def teardown(self):
+ def teardown_method(self):
rmtree(self.tmpdir)
del self.ds
@@ -186,11 +186,11 @@ class TestDataSourceExists:
class TestDataSourceAbspath:
- def setup(self):
+ def setup_method(self):
self.tmpdir = os.path.abspath(mkdtemp())
self.ds = datasource.DataSource(self.tmpdir)
- def teardown(self):
+ def teardown_method(self):
rmtree(self.tmpdir)
del self.ds
@@ -251,11 +251,11 @@ class TestDataSourceAbspath:
class TestRepositoryAbspath:
- def setup(self):
+ def setup_method(self):
self.tmpdir = os.path.abspath(mkdtemp())
self.repos = datasource.Repository(valid_baseurl(), self.tmpdir)
- def teardown(self):
+ def teardown_method(self):
rmtree(self.tmpdir)
del self.repos
@@ -284,11 +284,11 @@ class TestRepositoryAbspath:
class TestRepositoryExists:
- def setup(self):
+ def setup_method(self):
self.tmpdir = mkdtemp()
self.repos = datasource.Repository(valid_baseurl(), self.tmpdir)
- def teardown(self):
+ def teardown_method(self):
rmtree(self.tmpdir)
del self.repos
@@ -317,10 +317,10 @@ class TestRepositoryExists:
class TestOpenFunc:
- def setup(self):
+ def setup_method(self):
self.tmpdir = mkdtemp()
- def teardown(self):
+ def teardown_method(self):
rmtree(self.tmpdir)
def test_DataSourceOpen(self):