Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop warning py3status/tests/test_module_load.py:5 #2276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lasers
Copy link
Contributor

@lasers lasers commented Dec 23, 2024

Stop the warning by removing __init__ in favor of something like this or pytest fixture.

PytestCollectionWarning: cannot collect test class 'TestModule'
because it has a __init__ constructor (from: tests/test_module_load.py)
	class TestModule

EDIT: I can't verify using self or cls, but it doesn't look that important because of assert checking (approved) instance method, not variables.

tests/test_module_load.py Fixed Show fixed Hide fixed
@lasers lasers force-pushed the warning-testmodule branch from 3d7afa7 to c7957d9 Compare December 23, 2024 23:18
@lasers lasers changed the title fix warning py3status/tests/test_module_load.py:5 stop warning py3status/tests/test_module_load.py:5 Dec 23, 2024
@lasers lasers force-pushed the warning-testmodule branch from c7957d9 to 303f3aa Compare December 24, 2024 00:09
PytestCollectionWarning: cannot collect test class 'TestModule'
because it has a __init__ constructor (from: tests/test_module_load.py)
	class TestModule
@lasers lasers force-pushed the warning-testmodule branch from 303f3aa to b7bed2c Compare December 24, 2024 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant