-
Notifications
You must be signed in to change notification settings - Fork 20
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
Support for pytest-xdist #6
Comments
Can confirm, this does not work with xdist. I get an error like the following:
I do really hope someone picks up the package and maintains it as I think this definitely has a lot of potential vs. pytest-sugar. |
Oh bummer. That's because the workers report the file names relative to the
@joshuadavidthomas is already a official maintainer. 🎉 |
No worries, take your time! Thanks for the update. 👍 |
I've started to dig in to this. I'll keep this issue updated with what I find, in case I cannot finish it or someone else wants to pick it up. First thing I did notice is we'll need to rename what the plugin advertises itself as to https://github.com/pytest-dev/pytest-xdist/blob/master/src/xdist/dsession.py#L57-L60 self.terminal = config.pluginmanager.getplugin("terminalreporter")
if self.terminal:
self.trdist = TerminalDistReporter(config)
config.pluginmanager.register(self.trdist, "terminaldistreporter") But when pytest-rich/src/pytest_rich/plugin.py Lines 41 to 45 in e2353f9
Looking at another alternative terminal reporter, if IS_SUGAR_ENABLED and not getattr(config, "slaveinput", None):
# Get the standard terminal reporter plugin and replace it with our
standard_reporter = config.pluginmanager.getplugin("terminalreporter")
sugar_reporter = SugarTerminalReporter(standard_reporter)
config.pluginmanager.unregister(standard_reporter)
config.pluginmanager.register(sugar_reporter, "terminalreporter") |
@nicoddemus Any tips about what I should be looking at within |
My suggestion is to do what you are already doing, follow pytest-sugar's lead here. 😁 |
Make sure pytest-rich works with pytest-xdist.
I suspect we can get this support without any special code, given how pytest-rich currently leverages rich's live/progress features.
The text was updated successfully, but these errors were encountered: