Skip to content

Trying to update pytest 4 to 5 -> pytest_report_teststatus(report) Trying to update pytest 4.0 to 5 #6169

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

Closed
tuvshinot opened this issue Nov 12, 2019 · 8 comments
Labels
type: question general question, might be closed after 2 weeks of inactivity

Comments

@tuvshinot
Copy link

tuvshinot commented Nov 12, 2019

it gives me error pytest does not have config. i know that it was deprecated. And i can use fixture to receive config object.

@RonnyPfannschmidt
Copy link
Member

pytest_report_teststatus can take config as a parameter please try

@RonnyPfannschmidt RonnyPfannschmidt added the type: question general question, might be closed after 2 weeks of inactivity label Nov 12, 2019
@RonnyPfannschmidt
Copy link
Member

def pytest_report_teststatus(config, report):
  if (not config.option.poo) or ('poo' not in report.keywords) or (report.when != 'call'):
    return
  if (config.option.verbose == -1 and report.passed) or config.option.verbose >= 0:
    return (report.outcome, PILE_OF_POO, '%s (%s)' % (report.outcome.upper(), PILE_OF_POO))

untested

@RonnyPfannschmidt
Copy link
Member

the parameter is provided by pytest

@tuvshinot tuvshinot reopened this Nov 12, 2019
@tuvshinot tuvshinot changed the title Trying to update pytest 4 to 5 -> pytest_report_teststatus(report) Trying to update pytest 4.0 to 5 -> Nov 12, 2019
@tuvshinot tuvshinot changed the title Trying to update pytest 4.0 to 5 -> Trying to update pytest 4.0.1 to 5.2.0 -> config, serialization error Nov 12, 2019
@tuvshinot tuvshinot changed the title Trying to update pytest 4.0.1 to 5.2.0 -> config, serialization error Trying to update pytest 4.0.1 to 5.2.0 -> serialization error execnet.gateway_base.DumpError: can't serialize <enum 'ExitCode'> Nov 12, 2019
@The-Compiler
Copy link
Member

That's a different issue then - please post the full output you see over at pytest-dev/pytest-xdist#464.

@RonnyPfannschmidt

This comment has been minimized.

@RonnyPfannschmidt
Copy link
Member

also please do not reuse/change issues in that manner, its really confusing as this is now about 2 completely different things

@tuvshinot
Copy link
Author

sorry about that okey, then. i will change it back and create new one.

@tuvshinot tuvshinot changed the title Trying to update pytest 4.0.1 to 5.2.0 -> serialization error execnet.gateway_base.DumpError: can't serialize <enum 'ExitCode'> Trying to update pytest 4 to 5 -> pytest_report_teststatus(report) Trying to update pytest 4.0 to 5 Nov 12, 2019
@RonnyPfannschmidt
Copy link
Member

thanks for sorting this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question general question, might be closed after 2 weeks of inactivity
Projects
None yet
Development

No branches or pull requests

3 participants