Chilipp / autodocsumm

Extending your autodoc API docs with a summary
Apache License 2.0
48 stars 14 forks source link

0.2.8: pytest warnings #75

Closed kloczek closed 2 years ago

kloczek commented 2 years ago

I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

Here is pytest output:

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

tests/test_autodocsumm.py ..........x...........                                                                                                                     [100%]

============================================================================= warnings summary =============================================================================
tests/test_autodocsumm.py: 18 warnings
  /home/tkloczko/rpmbuild/BUILD/autodocsumm-0.2.8/tests/test_autodocsumm.py:44: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

  The code that caused this warning is on line 44 of the file /home/tkloczko/rpmbuild/BUILD/autodocsumm-0.2.8/tests/test_autodocsumm.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor.

    soup = bs4.BeautifulSoup(html)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
XFAIL tests/test_autodocsumm.py::TestAutosummaryDocumenter::test_warnings_depreciation
================================================================ 21 passed, 1 xfailed, 18 warnings in 3.63s ================================================================
kloczek commented 2 years ago

Tested. All looks clean 😄

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

tests/test_autodocsumm.py ..........x...........                                                                                                                     [100%]

========================================================================= short test summary info ==========================================================================
XFAIL tests/test_autodocsumm.py::TestAutosummaryDocumenter::test_warnings_depreciation
====================================================================== 21 passed, 1 xfailed in 4.64s =======================================================================