diff options
author | Sebastian Berg <sebastianb@nvidia.com> | 2022-10-27 14:57:14 +0200 |
---|---|---|
committer | Sebastian Berg <sebastianb@nvidia.com> | 2022-10-27 14:57:14 +0200 |
commit | 67841947b458f6bdc6c40d014512da9bc4717a3e (patch) | |
tree | 9683bb0863ef40219e3de2fb37013cef209a7edb /numpy/distutils/tests | |
parent | 2283052fd01138863a5741d84f358fdbea501bd9 (diff) | |
download | numpy-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/distutils/tests')
-rw-r--r-- | numpy/distutils/tests/test_ccompiler_opt_conf.py | 4 | ||||
-rw-r--r-- | numpy/distutils/tests/test_exec_command.py | 2 | ||||
-rw-r--r-- | numpy/distutils/tests/test_system_info.py | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/numpy/distutils/tests/test_ccompiler_opt_conf.py b/numpy/distutils/tests/test_ccompiler_opt_conf.py index 09c1fad40..d9e8b2b0a 100644 --- a/numpy/distutils/tests/test_ccompiler_opt_conf.py +++ b/numpy/distutils/tests/test_ccompiler_opt_conf.py @@ -161,9 +161,9 @@ class _TestConfFeatures(FakeCCompilerOpt): class TestConfFeatures(unittest.TestCase): def __init__(self, methodName="runTest"): unittest.TestCase.__init__(self, methodName) - self.setup() + self._setup() - def setup(self): + def _setup(self): FakeCCompilerOpt.conf_nocache = True def test_features(self): diff --git a/numpy/distutils/tests/test_exec_command.py b/numpy/distutils/tests/test_exec_command.py index d6eb7d1c3..157bd8427 100644 --- a/numpy/distutils/tests/test_exec_command.py +++ b/numpy/distutils/tests/test_exec_command.py @@ -94,7 +94,7 @@ def test_exec_command_stderr(): class TestExecCommand: - def setup(self): + def setup_method(self): self.pyexe = get_pythonexe() def check_nt(self, **kws): diff --git a/numpy/distutils/tests/test_system_info.py b/numpy/distutils/tests/test_system_info.py index 8c26271af..539badf07 100644 --- a/numpy/distutils/tests/test_system_info.py +++ b/numpy/distutils/tests/test_system_info.py @@ -130,7 +130,7 @@ class DuplicateOptionInfo(_system_info): class TestSystemInfoReading: - def setup(self): + def setup_method(self): """ Create the libraries """ # Create 2 sources and 2 libraries self._dir1 = mkdtemp() @@ -172,7 +172,7 @@ class TestSystemInfoReading: self._sitecfg) - def teardown(self): + def teardown_method(self): # Do each removal separately try: shutil.rmtree(self._dir1) |