Complains about test functions with non-None returns:
scpdt/tests/test_testmod.py::test_stopwords
/home/br/mambaforge/envs/scipy-dev/lib/python3.10/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but scpdt/tests/test_testmod.py::test_stopwords returned TestResults(failed=0, attempted=3), which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
warnings.warn(
To this end,
restructure the tests in test_testmod to assert and not return anything
shield testmod from pytest thinking it's a test function
$ pytest --pyargs scpdt
Complains about test functions with non-None returns:
To this end,
testmod
from pytest thinking it's a test function