Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1697519 - python-requests 2.21.0 cannot be tested with pytest 4
Summary: python-requests 2.21.0 cannot be tested with pytest 4
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-requests
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTEST4 PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-04-08 14:52 UTC by Miro Hrončok
Modified: 2019-05-29 14:01 UTC (History)
4 users (show)

Fixed In Version: python-requests-2.22.0-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-29 14:01:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kennethreitz requests issues 5048 0 'None' closed Test failures with pytest 4 2020-06-15 16:29:27 UTC
Github kennethreitz requests pull 5049 0 'None' closed Support pytest 4 2020-06-15 16:29:27 UTC

Description Miro Hrončok 2019-04-08 14:52:05 UTC
The tests of python-requests 2.21.0 are not compatible with pytest 4.

+ /usr/bin/python2 -m pytest -v
============================= test session starts ==============================
platform linux2 -- Python 2.7.16, pytest-4.3.1, py-1.7.0, pluggy-0.9.0 -- /usr/bin/python2
cachedir: .pytest_cache
rootdir: /builddir/build/BUILD/requests-2.21.0, inifile: pytest.ini
plugins: mock-1.10.3, cov-2.6.1
collecting ... collected 524 items / 1 errors / 523 selected

==================================== ERRORS ====================================
_____________________ ERROR collecting tests/test_utils.py _____________________
/usr/lib/python2.7/site-packages/pluggy/hooks.py:289: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python2.7/site-packages/pluggy/manager.py:68: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python2.7/site-packages/pluggy/manager.py:62: in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
/usr/lib/python2.7/site-packages/_pytest/python.py:226: in pytest_pycollect_makeitem
    res = list(collector._genfunctions(name, obj))
/usr/lib/python2.7/site-packages/_pytest/python.py:402: in _genfunctions
    self.ihook.pytest_generate_tests(metafunc=metafunc)
/usr/lib/python2.7/site-packages/pluggy/hooks.py:289: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/lib/python2.7/site-packages/pluggy/manager.py:68: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/lib/python2.7/site-packages/pluggy/manager.py:62: in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
/usr/lib/python2.7/site-packages/_pytest/python.py:133: in pytest_generate_tests
    metafunc.parametrize(*marker.args, **marker.kwargs)
/usr/lib/python2.7/site-packages/_pytest/python.py:994: in parametrize
    function_definition=self.definition,
/usr/lib/python2.7/site-packages/_pytest/mark/structures.py:113: in _for_parametrize
    if len(param.values) != len(argnames):
E   TypeError: object of type 'MarkDecorator' has no len()
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 1.43 seconds ============================
error: Bad exit status from /var/tmp/rpm-tmp.XQdbpx (%check)

This is because of https://docs.pytest.org/en/latest/deprecations.html#marks-in-pytest-mark-parametrize


Note You need to log in before you can comment on or make changes to this bug.