Skip to content

Commit 88c3ec5

Browse files
tijucaerikwrede
andauthored
pytest: Don't use nose like syntax in graphene/relay/tests/test_custom_global_id.py (#1539) (#1540)
pytest: Don't use nose like syntax The tests in test_custom_global_id.py use the old nose specific method 'setup(self)' which isn't supported anymore in Pytest 8+. The tests fail with this error message without modification. E pytest.PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release. E graphene/relay/tests/test_custom_global_id.py::TestIncompleteCustomGlobalID::test_must_define_resolve_global_id is using nose-specific method: `setup(self)` E To remove this warning, rename it to `setup_method(self)` E See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose Co-authored-by: Erik Wrede <[email protected]>
1 parent 17d09c8 commit 88c3ec5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

graphene/relay/tests/test_custom_global_id.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
class TestUUIDGlobalID:
12-
def setup(self):
12+
def setup_method(self):
1313
self.user_list = [
1414
{"id": uuid4(), "name": "First"},
1515
{"id": uuid4(), "name": "Second"},
@@ -77,7 +77,7 @@ def test_get_by_id(self):
7777

7878

7979
class TestSimpleGlobalID:
80-
def setup(self):
80+
def setup_method(self):
8181
self.user_list = [
8282
{"id": "my global primary key in clear 1", "name": "First"},
8383
{"id": "my global primary key in clear 2", "name": "Second"},
@@ -140,7 +140,7 @@ def test_get_by_id(self):
140140

141141

142142
class TestCustomGlobalID:
143-
def setup(self):
143+
def setup_method(self):
144144
self.user_list = [
145145
{"id": 1, "name": "First"},
146146
{"id": 2, "name": "Second"},
@@ -219,7 +219,7 @@ def test_get_by_id(self):
219219

220220

221221
class TestIncompleteCustomGlobalID:
222-
def setup(self):
222+
def setup_method(self):
223223
self.user_list = [
224224
{"id": 1, "name": "First"},
225225
{"id": 2, "name": "Second"},

0 commit comments

Comments
 (0)