You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a good first issue for new contributors to take on, if you have any questions, please ask on the task or in our Gitter room!
Description
Because the function is named test_should_run, pytest treats it as a test rather than a function.
Steps to Reproduce
make build-debs
Expected Behavior
No warnings
Actual Behavior
builder-focal/tests/test_security_updates.py::test_should_run
/home/user/QubesIncoming/dev/securedrop/.venv/lib/python3.9/site-packages/_pytest/python.py:199: PytestReturnNotNoneWarning: Expected None, but builder-focal/tests/test_security_updates.py::test_should_run returned False, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
warnings.warn(
Comments
Renaming it to should_run() would fix this.
The text was updated successfully, but these errors were encountered:
Hello! I've never contributed to an open source project, but I'd love to try this out. Is the only thing I need to do rename the function? I was just wondering what the scope of the issue was -- do I need to find where the function is run in other files?
Hi @evansandoval, that's correct. After renaming the function, you'll want to update wherever that function is called to use the new name so that the tests don't break. You can also open up a draft PR to see that the tests still pass after the name change.
This is a good first issue for new contributors to take on, if you have any questions, please ask on the task or in our Gitter room!
Description
Because the function is named
test_should_run
, pytest treats it as a test rather than a function.Steps to Reproduce
make build-debs
Expected Behavior
No warnings
Actual Behavior
Comments
Renaming it to
should_run()
would fix this.The text was updated successfully, but these errors were encountered: