Skip to content
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

Testsuite fails with latest pytest version #3392

Closed
glaubitz opened this issue Nov 16, 2018 · 4 comments · Fixed by #3430
Closed

Testsuite fails with latest pytest version #3392

glaubitz opened this issue Nov 16, 2018 · 4 comments · Fixed by #3430

Comments

@glaubitz
Copy link

glaubitz commented Nov 16, 2018

The testsuite fails when using a recent version of pytest with:

[  106s] ============================= test session starts ==============================
[  106s] platform linux -- Python 3.6.5, pytest-3.10.0, py-1.7.0, pluggy-0.8.0
[  106s] rootdir: /home/abuild/rpmbuild/BUILD/aiohttp-3.4.4, inifile: setup.cfg
[  106s] plugins: timeout-1.3.2, mock-1.10.0
[  113s] collected 2320 items / 2 errors
[  113s] 
[  113s] ==================================== ERRORS ====================================
[  113s] _______________ ERROR collecting tests/test_client_connection.py _______________
[  113s] tests/test_client_connection.py:14: in <module>
[  113s]     @pytest.fixture
[  113s] /usr/lib/python3.6/site-packages/_pytest/fixtures.py:1094: in fixture
[  113s]     return FixtureFunctionMarker("function", params, autouse, name=name)(scope)
[  113s] /usr/lib/python3.6/site-packages/_pytest/fixtures.py:1042: in __call__
[  113s]     warnings.warn(FIXTURE_NAMED_REQUEST)
[  113s] E   _pytest.warning_types.PytestDeprecationWarning: 'request' is a reserved name for fixtures and will raise an error in future versions
[  113s] ________________ ERROR collecting tests/test_web_exceptions.py _________________
[  113s] tests/test_web_exceptions.py:17: in <module>
[  113s]     @pytest.fixture
[  113s] /usr/lib/python3.6/site-packages/_pytest/fixtures.py:1094: in fixture
[  113s]     return FixtureFunctionMarker("function", params, autouse, name=name)(scope)
[  113s] /usr/lib/python3.6/site-packages/_pytest/fixtures.py:1042: in __call__
[  113s]     warnings.warn(FIXTURE_NAMED_REQUEST)
[  113s] /usr/lib/python3.6/site-packages/_pytest/runner.py:212: in __init__
[  113s]     self.result = func()
[  113s] /usr/lib/python3.6/site-packages/_pytest/runner.py:272: in <lambda>
[  113s]     call = CallInfo(lambda: list(collector.collect()), "collect")
[  113s] /usr/lib/python3.6/site-packages/_pytest/python.py:443: in collect
[  113s]     self.session._fixturemanager.parsefactories(self)
[  113s] /usr/lib/python3.6/site-packages/_pytest/fixtures.py:1301: in parsefactories
[  113s]     holderobj = node_or_obj.obj
[  113s] /usr/lib/python3.6/site-packages/_pytest/python.py:248: in fget
[  113s]     self._obj = obj = self._getobj()
[  113s] /usr/lib/python3.6/site-packages/_pytest/python.py:440: in _getobj
[  113s]     return self._importtestmodule()
[  113s] /usr/lib/python3.6/site-packages/_pytest/python.py:450: in _importtestmodule
[  113s]     mod = self.fspath.pyimport(ensuresyspath=importmode)
[  113s] /usr/lib/python3.6/site-packages/py/_path/local.py:668: in pyimport
[  113s]     __import__(modname)
[  113s] <frozen importlib._bootstrap>:971: in _find_and_load
[  113s]     ???
[  113s] <frozen importlib._bootstrap>:955: in _find_and_load_unlocked
[  113s]     ???
[  113s] <frozen importlib._bootstrap>:656: in _load_unlocked
[  113s]     ???
[  113s] <frozen importlib._bootstrap>:626: in _load_backward_compatible
[  113s]     ???
[  113s] /usr/lib/python3.6/site-packages/_pytest/assertion/rewrite.py:294: in load_module
[  113s]     six.exec_(co, mod.__dict__)
[  113s] tests/test_client_connection.py:14: in <module>
[  113s]     @pytest.fixture
[  113s] /usr/lib/python3.6/site-packages/_pytest/fixtures.py:1094: in fixture
[  113s]     return FixtureFunctionMarker("function", params, autouse, name=name)(scope)
[  113s] /usr/lib/python3.6/site-packages/_pytest/fixtures.py:1042: in __call__
[  113s]     warnings.warn(FIXTURE_NAMED_REQUEST)
[  113s] E   _pytest.warning_types.PytestDeprecationWarning: 'request' is a reserved name for fixtures and will raise an error in future versions
[  113s] !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
[  113s] =========================== 2 error in 7.04 seconds ============================

This seems to be a result of aiohttp using deprecated features of pytest.

Full build log available at: https://build.opensuse.org/build/devel:languages:python/openSUSE_Tumbleweed/x86_64/python-aiohttp/_log

@aio-libs-bot
Copy link

GitMate.io thinks the contributor most likely able to help you is @asvetlov.

Possibly related issues are #2148 (Failed tests), #1754 (ClientResponseError after upgrading to latest version), #2280 (Test fails on ppc64le), #2920 (AIOHttp failing after some requests), and #494 (Tests fail with pep8-1.6).

@asvetlov
Copy link
Member

asvetlov commented Nov 16, 2018

Sure, it is.
Would you make a patch with renaming request fixture from aiohttp test suite to something else?

@glaubitz
Copy link
Author

Yes, I'll look into it now.

@lock
Copy link

lock bot commented Dec 7, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Dec 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants