-
Notifications
You must be signed in to change notification settings - Fork 39
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
MNT: Do not completely take over test collection ignore #201
Conversation
in pytest-dev only
Indeed the test added here threw error with pytest-dev without any patch:
With the patch, error is gone. |
to ensure compatibility with pytest 7.4
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.
extreme nitpick, otherwise looks good.
CHANGES.rst
Outdated
@@ -1,6 +1,8 @@ | |||
0.12.2 (unreleased) | |||
=================== | |||
|
|||
- Compatibility with pytest 7.4 w.r.t. norecursedirs handling. [#201] |
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.
Spell it out pls :)
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.
OK, done! 😸
Unrelated, but I suppose we should maybe test all OSes with pytest-dev? The full CI matrix is done in 4minutes, so it wouldn't add much additional burden. |
Thx 😉 ! |
But what value does that add? We don't do that with other packages right now, and hopefully pytest itself would test across different platforms. Does not hurt but I also don't see a real need, so up to you. |
I would just like to have a more comprehensive test suite (I do recall where we indeed do an equal matrix on the 3 OSes), at worst, we waste ~5min of CI time once a week. We do walk through all the old versions already, but not that pedantic with newer versions, e.g. all are missing between 7.0 and dev. |
Actually, maybe that is a very good idea especially since doctest deals with paths a lot and Windows is always so special. But perhaps cron instead of per commit? I opened #202 about this. Thanks! |
ATM I prefer the per-commit option (and run all from cron), at least until the notifications are fixed for cron jobs. |
@@ -554,7 +554,7 @@ def get_list_opt(name): | |||
self._ignore_paths.append(path) | |||
break | |||
|
|||
return False | |||
# None = Let other plugins decide the outcome. |
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.
FWIW, I'd use an explicit return None
here - from PEP8:
Be consistent in return statements. Either all return statements in a function should return an expression, or none of them should. If any return statement returns an expression, any return statements where no value is returned should explicitly state this as
return None
, and an explicit return statement should be present at the end of the function (if reachable)
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.
Thanks, @The-Compiler ! I have done that in 7b605ef directly in main
since we're about to move the repo and I don't want extra overhead for a trivial change.
Main motivation is to fix compatibility with pytest 7.4.0.dev though theoretically this plugin should not completely take over the ignore part of test collection? See pytest-dev/pytest#11082 (comment) for more details. Affected issue:
I am adding a test first to make sure it fails in pytest-dev before trying out the patch.
I am also using, see #200 .pytester
instead oftestdir