-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
merge the pytest-cache plugin into core #828
merge the pytest-cache plugin into core #828
Conversation
This will be an excellent feature for 2.8. 😎 |
cache: working with cross-testrun state | ||
======================================= | ||
|
||
Usage |
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.
This session about usage should go into usage.txt
, I think
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.
Also, all these new docs should have a .. versionadded:: 2.8
directive to them.
do i miss something or does this PR not yet skip the loading of "pytest-cache" and will thus lead to option confclits? |
432fde0
to
0d8d9c6
Compare
due to naming the plugin cacheprovider we will naturally superseed the external one, which uses the cacheprovider entrypoint, that is not considered since we have a core plugin with the same name |
pytest-flakes is currently broken due to using json |
assert result.ret == 0 | ||
result.stdout.fnmatch_lines(["*1 passed*"]) | ||
|
||
def XXX_test_cachefuncarg(self, testdir): |
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.
xfail?
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.
that one i probably missed when porting from pytest-cache
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 imagined. 😄
(btw, did you notice the comments I made about the docs? Just making sure)
But what's the problem? The flakes environment explicitly uses python2.7, which has |
pytest-flakes pases a set in, thats not json compatible |
Oh so you mean the latest |
pytest-cache originally supported sets and other builtins |
Oh now I undrstand, thanks. So that's a backward incompatibility change right? We should at least mention this in the docs and in the CHANGELOG. |
@@ -1,6 +1,8 @@ | |||
2.8.0.dev (compared to 2.7.X) | |||
----------------------------- | |||
|
|||
- merge the pytest-cache extension into core |
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 it's worth adding here how this will affect users with pytest-cache
installed.
Also, add a "Thanks Ronny Pfannschmidt for the PR" note here. 😉
3589e32
to
57fffee
Compare
57fffee
to
8f553f6
Compare
42d8e29
to
807c90c
Compare
ill finish it up by turning serialization failure into a warning, and providing optional arguments to define the serializer |
@@ -124,6 +120,11 @@ def _main(config, session): | |||
config.hook.pytest_collection(session=session) | |||
config.hook.pytest_runtestloop(session=session) | |||
|
|||
if session.testsfailed: |
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.
👍
Kudos to the warning, but what you plan to do regarding the serializer options exactly? To allow the user to provide its own serializer class for example? |
More about providing dumps and loads as arguments Unfortunately warnings in early usage geht hidden due to a bug, so ill leave the internalererror for now |
and extend the ignored errors list so pytest is clean we def have to trim down that one
there was a disabled test
0f108e1
to
cd475c7
Compare
session.exitstatus = EXIT_TESTSFAILED | ||
elif session.testscollected == 0: | ||
session.exitstatus = EXIT_NOTESTSCOLLECTED | ||
|
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.
is this change of moving this code somewhere else related to pytest cache integrastion?
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.
no, i think we should move it to mainline before - @nicoddemus did the original refactoring which i had to partially revert/change to have cache output good return codes for commands unrelated to running tests
To push through with the integration I opened a new PR #1015 which contains doc fixes. |
this is a recreation of the merge that integrates the cache plugin
this time the looponfail mode was left out due to unsolved issues