Skip to content

1.2.1: pytest warnings #377

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

Closed
kloczek opened this issue Apr 10, 2022 · 5 comments · Fixed by #383
Closed

1.2.1: pytest warnings #377

kloczek opened this issue Apr 10, 2022 · 5 comments · Fixed by #383

Comments

@kloczek
Copy link

kloczek commented Apr 10, 2022

Looks like latest pytest shows some warnings

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-numpydoc-1.2.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-numpydoc-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/numpydoc-1.2.1, configfile: setup.cfg
plugins: anyio-3.5.0, cov-3.0.0
collected 239 items

numpydoc/numpydoc.py .                                                                                                                                               [  0%]
numpydoc/validate.py .                                                                                                                                               [  0%]
numpydoc/tests/test_docscrape.py ...........................................................                                                                         [ 25%]
numpydoc/tests/test_full.py .....                                                                                                                                    [ 27%]
numpydoc/tests/test_main.py .......                                                                                                                                  [ 30%]
numpydoc/tests/test_numpydoc.py ........                                                                                                                             [ 33%]
numpydoc/tests/test_validate.py ...............................................................................x..x............                                      [ 73%]
numpydoc/tests/test_xref.py ...............................................................                                                                          [100%]

============================================================================= warnings summary =============================================================================
../../../../../usr/lib64/python3.8/site-packages/coverage/inorout.py:472
  /usr/lib64/python3.8/site-packages/coverage/inorout.py:472: CoverageWarning: --include is ignored because --source is set (include-ignored)
    self.warn("--include is ignored because --source is set", slug="include-ignored")

numpydoc/tests/test_numpydoc.py:194
  /home/tkloczko/rpmbuild/BUILD/numpydoc-1.2.1/numpydoc/tests/test_numpydoc.py:194: DeprecationWarning: invalid escape sequence \[
    with pytest.raises(ValueError, match="\['shouldnt-be-a-str'\]"):

numpydoc/tests/test_validate.py: 42 warnings
  /usr/lib/python3.8/site-packages/_pytest/python.py:192: PytestRemovedIn8Warning: Passing None has been deprecated.
  See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases.
    result = testfunction(**testargs)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
-------------------------------------------- generated xml file: /home/tkloczko/rpmbuild/BUILD/numpydoc-1.2.1/junit-results.xml --------------------------------------------


========================================================================= short test summary info ==========================================================================
XFAIL numpydoc/tests/test_validate.py::TestValidator::test_bad_docstrings[BadParameters-blank_lines-msgs30]
XFAIL numpydoc/tests/test_validate.py::TestValidator::test_bad_docstrings[BadReturns-no_type-msgs33]
=============================================================== 237 passed, 2 xfailed, 44 warnings in 3.04s ================================================================
@kloczek
Copy link
Author

kloczek commented Apr 19, 2022

Sill it is yet another warning

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-numpydoc-1.2.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-numpydoc-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/numpydoc-1.2.1, configfile: setup.cfg
plugins: cov-3.0.0
collected 239 items

numpydoc/numpydoc.py .                                                                                                                                               [  0%]
numpydoc/validate.py .                                                                                                                                               [  0%]
numpydoc/tests/test_docscrape.py ...........................................................                                                                         [ 25%]
numpydoc/tests/test_full.py .....                                                                                                                                    [ 27%]
numpydoc/tests/test_main.py .......                                                                                                                                  [ 30%]
numpydoc/tests/test_numpydoc.py ........                                                                                                                             [ 33%]
numpydoc/tests/test_validate.py ...............................................................................x..x............                                      [ 73%]
numpydoc/tests/test_xref.py ...............................................................                                                                          [100%]

============================================================================= warnings summary =============================================================================
numpydoc/tests/test_numpydoc.py:194
  /home/tkloczko/rpmbuild/BUILD/numpydoc-1.2.1/numpydoc/tests/test_numpydoc.py:194: DeprecationWarning: invalid escape sequence \[
    with pytest.raises(ValueError, match="\['shouldnt-be-a-str'\]"):

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
-------------------------------------------- generated xml file: /home/tkloczko/rpmbuild/BUILD/numpydoc-1.2.1/junit-results.xml --------------------------------------------


========================================================================= short test summary info ==========================================================================
XFAIL numpydoc/tests/test_validate.py::TestValidator::test_bad_docstrings[BadParameters-blank_lines-msgs30]
XFAIL numpydoc/tests/test_validate.py::TestValidator::test_bad_docstrings[BadReturns-no_type-msgs33]
================================================================ 237 passed, 2 xfailed, 1 warning in 2.97s =================================================================

@larsoner
Copy link
Collaborator

@kloczek would you be up for making a PR to fix this warning?

@kloczek
Copy link
Author

kloczek commented Apr 19, 2022

Sorry .. I have still very long queue other modeles to package.
However you may count on me about reporting what I would be able to spot or test ASP any changes or not commitet chenges.

@rossbar
Copy link
Contributor

rossbar commented Apr 19, 2022

This warning has already been fixed on main, likely by #371 though I didn't bother to verify.

@kloczek
Copy link
Author

kloczek commented Apr 29, 2022

Tested 1.3.0 and all looks clean.
Thx 😃

+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/numpydoc-1.3.0, configfile: setup.cfg
plugins: cov-3.0.0
collected 239 items

numpydoc/numpydoc.py .                                                                                                                                               [  0%]
numpydoc/validate.py .                                                                                                                                               [  0%]
numpydoc/tests/test_docscrape.py ...........................................................                                                                         [ 25%]
numpydoc/tests/test_full.py .....                                                                                                                                    [ 27%]
numpydoc/tests/test_main.py .......                                                                                                                                  [ 30%]
numpydoc/tests/test_numpydoc.py ........                                                                                                                             [ 33%]
numpydoc/tests/test_validate.py ...............................................................................x..x............                                      [ 73%]
numpydoc/tests/test_xref.py ...............................................................                                                                          [100%]

-------------------------------------------- generated xml file: /home/tkloczko/rpmbuild/BUILD/numpydoc-1.3.0/junit-results.xml --------------------------------------------


========================================================================= short test summary info ==========================================================================
XFAIL numpydoc/tests/test_validate.py::TestValidator::test_bad_docstrings[BadParameters-blank_lines-msgs30]
XFAIL numpydoc/tests/test_validate.py::TestValidator::test_bad_docstrings[BadReturns-no_type-msgs33]
====================================================================== 237 passed, 2 xfailed in 2.83s ======================================================================

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 a pull request may close this issue.

3 participants