Repository navigation
1.1: test suite is failing #529
Copy link
Copy link
Closed
Description
+ /usr/bin/python3 -m pytest -k 'not test_encoding'
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.3, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
rootdir: /home/tkloczko/rpmbuild/BUILD/html5lib-1.1, configfile: pytest.ini
plugins: flaky-3.6.1, forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, cov-2.10.1, xdist-2.2.0, asyncio-0.14.0, hypothesis-6.0.2, expect-1.1.0
collected 0 items / 1 error
================================================================================== ERRORS ==================================================================================
______________________________________________________________________ ERROR collecting test session _______________________________________________________________________
Direct construction of TokenizerFile has been deprecated, please use TokenizerFile.from_parent.
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1183
/usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1183: PytestDeprecationWarning: The --strict option is deprecated, use --strict-markers instead.
self.issue_config_time_warning(
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
ERROR
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================= 1 warning, 1 error in 0.25s ========================================================================
Metadata
Metadata
Assignees
Labels
No labels
Activity
kloczek commentedon Jan 19, 2021
tox based test suite is warnings:
jayaddison commentedon Jan 19, 2021
This may be a duplicate of #505 (support for
pytestv6), and if so should be resolved by pull request #506 (pending an updated release ofhtml5lib).kloczek commentedon Jan 19, 2021
FYI I'm usimg pytest 6.2.1.
kloczek commentedon Jan 19, 2021
Just tested that patch.
Still I see some warnings:
I can confirm that with #505 pytest is now happy :)
BTW which one method fo uou recommend of the test suite execution? straight pytest or over tox?
jayaddison commentedon Jan 19, 2021
This looks like an advisory message, as far as I can tell - reading up on the issue it links to (and adding any feedback you have) could be useful if & when you have time.
Glad to hear that!
It depends on what you're trying to do, I think. The current guidance seems to recommend
pytestif you're running against a single version of Python, ortoxas more appropriate if you want to check multi-version Python compatibility.kloczek commentedon Aug 29, 2021
I'm building rpm package fo exct version .. so pytest should be enough.
BTW in my build prcedure I've switched to VCV tagged tarball because git tree contains sphinx documentation.
However after that I see more pytest issues.
Looks like in giot repo is missing
tests/testdata/encoding/chardet/test_big5.txtfile.Q: where I can find it?
Also please have look on other pytaest warnings.
hugovk commentedon Apr 3, 2022
Please see PR #544.
[-]1.1: testt suite is failing[/-][+]1.1: test suite is failing[/+]kloczek commentedon Apr 20, 2022
Here is updated output with that PR:
hugovk commentedon Apr 20, 2022
The new warning:
PytestRemovedIn8Warning: The (fspath: py.path.local) argument to SanitizerFile is deprecated. Please use the (path: pathlib.Path) argument instead. See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-pathYou're getting that because you're testing with pytest 7, but this project doesn't support testing pytest 7.
requirements-test.txthas:The fix is to use the new
pytest_collect_fileadded in pytest 7. Compare:Something like:
But that of course requires
pytest>=7which is going to break for Python 2.7 because pytest 4.6 is the last to support 2.7:https://docs.pytest.org/en/7.1.x/py27-py34-deprecation.html
I propose dropping EOL Python 2.7 instead: #536
hugovk commentedon Apr 20, 2022
This new deprecation warning is now fixed in 589b01c in PR #536.