[tests] add Python 3.10 env, update pytest dependency#30
Conversation
Codecov Report
@@ Coverage Diff @@ ## master #30 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 3 3 Lines 158 189 +31 ========================================= + Hits 158 189 +31
Continue to review full report at Codecov.
|
tests/conftest.py Outdated
| | ||
| In the context of scrapy-playwright, this allows to unpin the outdated pytest<5.4.0 dependency, | ||
| while keeping pytest-asyncio==0.10, as pytest-asyncio>=0.11 currently breaks tests | ||
| (likely to be because of https://github.com/pytest-dev/pytest-asyncio/issues/157). |
There was a problem hiding this comment.
Is the problem pytest-dev/pytest-asyncio#157 or the fix for it (pytest-dev/pytest-asyncio#156) introduced in 0.12? Is pytest-asyncio>=0.12 not an option?
There was a problem hiding this comment.
0.11 is the first version that fails. I tried versions 0.12 and 0.15.1 (the latest at the time of writing) and they also fail. I think upgrading it might take some more research.
There was a problem hiding this comment.
Upon closer inspection, the errors with 0.12 point to Twisted (RuntimeError: twisted reactor has stopped). There are probably some unexpected interactions with pytest-twisted.
There was a problem hiding this comment.
Since pytest-dev/pytest-asyncio#157 is probably not the issue then, shall we just remove the parenthesized statement from the comment and merge?
There was a problem hiding this comment.
Fair point, now the issues are mentioned here for future reference anyway 👍
Dependency hell.
pytest==6.2.5is needed for Python 3.10 support. We currently havepytest-asyncio<0.11(tests break otherwise), which breaks with the defaultpytest_pycollect_makeitemimplementation frompytest>=5.4.The next step would be to figure out a way to update
pytest-asyncio.