-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add test environment using pluggy from master branch #2744
Conversation
pluggy>=0.5 already warns about those
For some reason, the previous approach brakes 'coveralls' because pip still tries to install the 'pluggy' master requirement (git+https://...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you've got one API mismatch and maybe a slight factoring you can do in the tox.ini
other wise looks good.
testing/test_collection.py
Outdated
rep.headerlines += ["header1"] | ||
return rep | ||
outcome.set_result(rep) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicoddemus that method doesn't exist I don't think?
It's force_result().
I do, however, prefer this name better and think we should move to it.
It fits with Future.set_result()
which may be something that's handy if we ever want to offer an async API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the current name is much better explaining whats going on as a futures set_result will raise a exception on second use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RonnyPfannschmidt fair enough.
Either way I'm confused how this test is passing if the method name is wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I will have to take a closer look later, indeed this is weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh of course, it raises an error at the rep.headerlines += ["header1"]
line. Plus it is an "xfail" test so it is not really running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm updating to force_result
anyway to avoid future confusion.
tox.ini
Outdated
[testenv:py35-pluggymaster] | ||
passenv={[testenv]passenv} | ||
commands={[testenv]commands} | ||
setenv= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can these two be pulled from the py27 job above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, will do.
Even though the test is not running at the moment (xfail), at least we avoid future confusion
Done requested changes. |
@nicoddemus please rebase |
commands={[testenv:py27-pluggymaster]commands} | ||
setenv= | ||
_PYTEST_SETUP_SKIP_PLUGGY_DEP=1 | ||
deps = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicoddemus heh I was actually thinking to derive setenv
and deps
just because they're common to these two envs.
Not a big deal though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as that call to force_result()
actually made a difference I think this is good 👍
Fixed the merge conflict. 😓 |
After this is merged, we should re-trigger pluggy's master to ensure it is fixed. |
Fix #2737
After merging this we can conclude pytest-dev/pluggy#79.