-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
When using classes to group functions, I'm interested in this pattern:
"test_http_requests.py"
class TestGet:
@staticmethod
def test_simple_get():
pass
@staticmethod
def test_query_string():
pass
class TestPut:
@staticmethod
def test_no_data():
pass
@staticmethod
def test_binary_data():
pass
Using the @staticmethod
decorator makes it clear that I'm not using the class for anything but grouping.
Unfortunately, pytest fails to collect any method so decorated. If I remove the decorator and add the self
argument in the above example, pytest collects as expected.
Pytest 3.1.2, Python 2.7.13, no virtualenv, MacOS 10.12.5
Metadata
Metadata
Assignees
Labels
No labels