Skip to content

Commit

Permalink
fix warning py3status/tests/test_module_load.py:5
Browse files Browse the repository at this point in the history
PytestCollectionWarning: cannot collect test class 'TestModule'
because it has a __init__ constructor (from: tests/test_module_load.py)
	class TestModule
  • Loading branch information
lasers committed Dec 23, 2024
1 parent 5d73d00 commit 3d7afa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_module_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
class TestModule:
static_variable = 123

def __init__(self):
@classmethod
def setup_class(self):

Check notice

Code scanning / CodeQL

First parameter of a class method is not named 'cls' Note test

Class methods or methods of a type deriving from type should have 'cls', rather than 'self', as their first parameter.
self.instance_variable = 321

def post_config_hook(self):
Expand Down

0 comments on commit 3d7afa7

Please sign in to comment.