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

Upgrading to pytest:6.0.0 version is causing internal error . #7576

Closed
pranav165 opened this issue Jul 29, 2020 · 1 comment
Closed

Upgrading to pytest:6.0.0 version is causing internal error . #7576

pranav165 opened this issue Jul 29, 2020 · 1 comment

Comments

@pranav165
Copy link

After upgrading pytest to 6.0.0 from 5.4.3 , tests are failing causing the following error. I believe it occurs whenever a test marked as skipped is encountered.
We are running tests in parallel using pytest-xdist package. Reverting just pytest version to 5.4.3 solves the below error

INTERNALERROR> Traceback (most recent call last):
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/_pytest/main.py", line 240, in wrap_session
[14:00:43]INTERNALERROR> session.exitstatus = doit(config, session) or 0
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/_pytest/main.py", line 296, in _main
[14:00:43]INTERNALERROR> config.hook.pytest_runtestloop(session=session)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in call
[14:00:43]INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
[14:00:43]INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in
[14:00:43]INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
[14:00:43]INTERNALERROR> return outcome.get_result()
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
[14:00:43]INTERNALERROR> raise ex[1].with_traceback(ex[2])
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
[14:00:43]INTERNALERROR> res = hook_impl.function(*args)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/xdist/dsession.py", line 112, in pytest_runtestloop
[14:00:43]INTERNALERROR> self.loop_once()
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/xdist/dsession.py", line 135, in loop_once
[14:00:43]INTERNALERROR> call(**kwargs)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/xdist/dsession.py", line 254, in worker_testreport
[14:00:43]INTERNALERROR> self.config.hook.pytest_runtest_logreport(report=rep)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in call
[14:00:43]INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
[14:00:43]INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in
[14:00:43]INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
[14:00:43]INTERNALERROR> return outcome.get_result()
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
[14:00:43]INTERNALERROR> raise ex[1].with_traceback(ex[2])
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
[14:00:43]INTERNALERROR> res = hook_impl.function(*args)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pytest_html/plugin.py", line 602, in pytest_runtest_logreport
[14:00:43]INTERNALERROR> self.append_skipped(report)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pytest_html/plugin.py", line 380, in append_skipped
[14:00:43]INTERNALERROR> self._appendrow("Skipped", report)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pytest_html/plugin.py", line 340, in _appendrow
[14:00:43]INTERNALERROR> result = self.TestResult(outcome, report, self.logfile, self.config)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pytest_html/plugin.py", line 157, in init
[14:00:43]INTERNALERROR> self.append_log_html(report, self.additional_html)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/pytest_html/plugin.py", line 266, in append_log_html
[14:00:43]INTERNALERROR> for line in report.longreprtext.splitlines():
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/_pytest/reports.py", line 105, in longreprtext
[14:00:43]INTERNALERROR> self.toterminal(tw)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/_pytest/reports.py", line 85, in toterminal
[14:00:43]INTERNALERROR> out.line(longrepr)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/_pytest/_io/terminalwriter.py", line 168, in line
[14:00:43]INTERNALERROR> self.write(s, **markup)
[14:00:43]INTERNALERROR> File "/home/e2e/venv/lib/python3.7/site-packages/_pytest/_io/terminalwriter.py", line 144, in write
[14:00:43]INTERNALERROR> current_line = msg.rsplit("\n", 1)[-1]
[14:00:43]INTERNALERROR> AttributeError: 'tuple' object has no attribute 'rsplit'

Installed packages:
metadata: {'Python': '3.7.3', 'Platform': 'Linux-3.10.0-862.14.4.el7.x86_64-x86_64-with-debian-10.4', 'Packages': {'pytest': '6.0.0', 'py': '1.9.0', 'pluggy': '0.13.1'}, 'Plugins': {'forked': '1.3.0', 'html': '2.1.1', 'metadata': '1.10.0', 'repeat': '0.8.0', 'rerunfailures': '9.0', 'xdist': '1.34.0'},
[13:57:08]rootdir: /home/e2e, configfile: pytest.ini
[13:57:08]plugins: forked-1.3.0, html-2.1.1, metadata-1.10.0, repeat-0.8.0, rerunfailures-9.0, xdist-1.34.0

@bluetech
Copy link
Member

This is a duplicate of #7559, will be fixed in 6.0.1 which should be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants