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

Unable to extend reports when using pytest-xdist #109

Closed
pytestbot opened this issue Jan 5, 2012 · 4 comments
Closed

Unable to extend reports when using pytest-xdist #109

pytestbot opened this issue Jan 5, 2012 · 4 comments
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Dave Hunt (BitBucket: davehunt, GitHub: davehunt)


The following example plugin code fails when run with pytest-xdist:

#!python

def pytest_runtest_makereport(__multicall__, item, call):
    report = __multicall__.execute()
    if report.when == 'call':
        report.xreport = True
    return report

The failure is:

platform darwin -- Python 2.6.7 -- pytest-2.2.1
gw0 [1] / gw1 [1]
scheduling tests via LoadScheduling
!!!!!!!!!!!!!!!!!!!! /Users/dave/.virtualenvs/env/lib/python2.6/site-packages/xdist/slavemanage.py:301: TypeError: __init__() got an unexpected keyword argument 'xreport'
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/dave/.virtualenvs/env/lib/python2.6/site-packages/xdist/slavemanage.py", line 284, in process_from_remote
INTERNALERROR>     rep = unserialize_report(eventname, kwargs['data'])
INTERNALERROR>   File "/Users/dave/.virtualenvs/env/lib/python2.6/site-packages/xdist/slavemanage.py", line 301, in unserialize_report
INTERNALERROR>     return runner.TestReport(**d)
INTERNALERROR> TypeError: __init__() got an unexpected keyword argument 'xreport'

@pytestbot
Copy link
Contributor Author

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


i implemented http://paste.pocoo.org/show/530506/ as proof of concept solution

it might make sense to investigate other means like blank objet creation + dict updating

the mapping might be overcomplicated as well

@pytestbot
Copy link
Contributor Author

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


http://paste.pocoo.org/show/531123/ is more simple

@pytestbot
Copy link
Contributor Author

Original comment by Dave Hunt (BitBucket: davehunt, GitHub: davehunt):


Any progress on this? I'd be happy to test patches for you.

@pytestbot
Copy link
Contributor Author

Original comment by Dave Hunt (BitBucket: davehunt, GitHub: davehunt):


I've tested the fix in commit 6ef58a238376 and it works for me, thanks Ronny!

@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jun 15, 2015
mgorny pushed a commit to mgorny/pytest that referenced this issue May 27, 2023
…arget

Make makefile target 'upload' to use './foreach.sh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

1 participant