diff options
author | Kefu Chai <tchaikov@gmail.com> | 2022-12-18 13:16:02 +0100 |
---|---|---|
committer | Kefu Chai <tchaikov@gmail.com> | 2022-12-18 13:23:47 +0100 |
commit | 5878b9486acd7831c6c795453c7f2a9a138261c8 (patch) | |
tree | 6b8a0c9a1794c9bdfb82d4d69148a3a4ba442313 /src/pybind/mgr/pg_autoscaler/tests | |
parent | pybind/mgr/prometheus: avoid using distutils (diff) | |
download | ceph-5878b9486acd7831c6c795453c7f2a9a138261c8.tar.xz ceph-5878b9486acd7831c6c795453c7f2a9a138261c8.zip |
pybind/mgr: s/setup(self)/setup_method(self)/
avoid pytest warnings like:
4: pg_autoscaler/tests/test_cal_final_pg_target.py::TestPgAutoscaler::test_even_pools_one_meta_three_bulk
4: /home/kefu/dev/ceph/src/pybind/mgr/.tox/py3/lib/python3.10/site-packages/_pytest/fixtures.py:900: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
4: pg_autoscaler/tests/test_cal_final_pg_target.py::TestPgAutoscaler::test_even_pools_one_meta_three_bulk is using nose-specific method: `setup(self)`
4: To remove this warning, rename it to `setup_method(self)`
4: See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
4: fixture_result = next(generator)
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Diffstat (limited to 'src/pybind/mgr/pg_autoscaler/tests')
-rw-r--r-- | src/pybind/mgr/pg_autoscaler/tests/test_cal_final_pg_target.py | 2 | ||||
-rw-r--r-- | src/pybind/mgr/pg_autoscaler/tests/test_overlapping_roots.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pybind/mgr/pg_autoscaler/tests/test_cal_final_pg_target.py b/src/pybind/mgr/pg_autoscaler/tests/test_cal_final_pg_target.py index d8ba83d111a..655025bbef8 100644 --- a/src/pybind/mgr/pg_autoscaler/tests/test_cal_final_pg_target.py +++ b/src/pybind/mgr/pg_autoscaler/tests/test_cal_final_pg_target.py @@ -18,7 +18,7 @@ class RootMapItem: class TestPgAutoscaler(object): - def setup(self): + def setup_method(self): # a bunch of attributes for testing. self.autoscaler = module.PgAutoscaler('module_name', 0, 0) diff --git a/src/pybind/mgr/pg_autoscaler/tests/test_overlapping_roots.py b/src/pybind/mgr/pg_autoscaler/tests/test_overlapping_roots.py index bf4ddfb6202..009019707ec 100644 --- a/src/pybind/mgr/pg_autoscaler/tests/test_overlapping_roots.py +++ b/src/pybind/mgr/pg_autoscaler/tests/test_overlapping_roots.py @@ -42,7 +42,7 @@ class CRUSH: class TestPgAutoscaler(object): - def setup(self): + def setup_method(self): # a bunch of attributes for testing. self.autoscaler = module.PgAutoscaler('module_name', 0, 0) |