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
https://github.com/kennethreitz/requests/issues/5048 https://github.com/kennethreitz/requests/pull/5049