Bug 1697519

Summary: python-requests 2.21.0 cannot be tested with pytest 4
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-requestsAssignee: Fedora Infrastructure SIG <infra-sig>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aurelien, cstratak, infra-sig, jeremy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-requests-2.22.0-1.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-29 14:01:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1671167, 1686977    

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