Hide Forgot
Description of problem: python-ruamel-yaml tests fail on EPEL7: platform linux2 -- Python 2.7.5 -- py-1.4.27 -- pytest-2.7.0 rootdir: /builddir/build/BUILD/ruamel-yaml-171c3653fc01, inifile: tox.ini collected 185 items _test/test_a_dedent.py ...... _test/test_anchor.py ............F..... _test/test_comment_manipulation.py ...................... _test/test_comments.py ....................................... INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 84, in wrap_session INTERNALERROR> doit(config, session) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 122, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 521, in __call__ INTERNALERROR> return self._docall(self.methods, kwargs) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 528, in _docall INTERNALERROR> firstresult=self.firstresult).execute() INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 394, in execute INTERNALERROR> res = method(*args) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 142, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 521, in __call__ INTERNALERROR> return self._docall(self.methods, kwargs) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 528, in _docall INTERNALERROR> firstresult=self.firstresult).execute() INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 393, in execute INTERNALERROR> return wrapped_call(method(*args), self.execute) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 113, in wrapped_call INTERNALERROR> return call_outcome.get_result() INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 138, in get_result INTERNALERROR> py.builtin._reraise(*ex) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 123, in __init__ INTERNALERROR> self.result = func() INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 394, in execute INTERNALERROR> res = method(*args) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol INTERNALERROR> runtestprotocol(item, nextitem=nextitem) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/runner.py", line 75, in runtestprotocol INTERNALERROR> reports.append(call_and_report(item, "call", log)) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/runner.py", line 121, in call_and_report INTERNALERROR> report = hook.pytest_runtest_makereport(item=item, call=call) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 521, in __call__ INTERNALERROR> return self._docall(self.methods, kwargs) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 528, in _docall INTERNALERROR> firstresult=self.firstresult).execute() INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 393, in execute INTERNALERROR> return wrapped_call(method(*args), self.execute) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 109, in wrapped_call INTERNALERROR> wrap_controller.send(call_outcome) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/skipping.py", line 157, in pytest_runtest_makereport INTERNALERROR> rep = outcome.get_result() INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 138, in get_result INTERNALERROR> py.builtin._reraise(*ex) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 123, in __init__ INTERNALERROR> self.result = func() INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/core.py", line 394, in execute INTERNALERROR> res = method(*args) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/runner.py", line 224, in pytest_runtest_makereport INTERNALERROR> longrepr = item.repr_failure(excinfo) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/python.py", line 625, in repr_failure INTERNALERROR> return self._repr_failure_py(excinfo, style=style) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/python.py", line 618, in _repr_failure_py INTERNALERROR> style=style) INTERNALERROR> File "/usr/lib/python2.7/site-packages/_pytest/main.py", line 410, in _repr_failure_py INTERNALERROR> style=style, tbfilter=tbfilter) INTERNALERROR> File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 412, in getrepr INTERNALERROR> return fmt.repr_excinfo(self) INTERNALERROR> File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 590, in repr_excinfo INTERNALERROR> reprtraceback = self.repr_traceback(excinfo) INTERNALERROR> File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 582, in repr_traceback INTERNALERROR> reprentry = self.repr_traceback_entry(entry, einfo) INTERNALERROR> File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 543, in repr_traceback_entry INTERNALERROR> s = self.get_source(source, line_index, excinfo, short=short) INTERNALERROR> File "/usr/lib/python2.7/site-packages/py/_code/code.py", line 484, in get_source INTERNALERROR> lines.append(self.flow_marker + " " + source.lines[line_index]) INTERNALERROR> IndexError: list index out of range this is fixed in later python-py - apparently in 1.49 according to https://github.com/pytest-dev/pytest/issues/752 and I can confirm fixed in 1.4.31. Version-Release number of selected component (if applicable): 1.4.27-1.el7
Hi Orion. When trying to reproduce the issue (aka build the package against epel7 as I understood), it can't find some packages: https://kojipkgs.fedoraproject.org//work/tasks/594/17300594/mock_output.log
Finally have deps in the buildroot: https://koji.fedoraproject.org/koji/taskinfo?taskID=17509010
Created attachment 1246302 [details] Minimal reproducer
Reproducer: 1) Download the minimal reproducer test.py 2) yum install pytest 3) execute 'py.test test.py" Without the fix the result is the same as the report on the first comment With the fix the result should be: ============================= test session starts ============================== platform linux2 -- Python 2.7.5 -- py-1.4.27 -- pytest-2.7.0 rootdir: /home, inifile: collected 1 items test.py F =================================== FAILURES =================================== _____________________________________ test _____________________________________ def test(): [ > 'valid',bad] E NameError: global name 'bad' is not defined test.py:3: NameError =========================== 1 failed in 0.00 seconds ===========================
Created attachment 1246336 [details] build.log with fixed python-py I backported the relevant commits and tried to rebuild the package against epel7 but it now fails on some other test cases. Attaching the build.log
Great. The python2 error seems to be an issue with ruamel-yaml and an old pytest. python3 errors were due to a problem with the python-typing packaging which should be fixed with python-typing-3.5.2.2-3.el7. Thanks for working on this.
The fix is: https://bitbucket.org/pytest-dev/py/commits/7fba3887a4e0
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:1930