-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Turn warnings into errors WIP, waiting #2598 #2599
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
Turn warnings into errors WIP, waiting #2598 #2599
Conversation
@@ -170,32 +170,6 @@ def f(): | |||
with pytest.deprecated_call(): | |||
f() | |||
|
|||
def test_deprecated_function_already_called(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.
Realized that this test is already covered by test_deprecated_call_modes
so it was redundant.
testing/python/collect.py
Outdated
@@ -705,6 +711,7 @@ def test_xfail(x): | |||
result = testdir.runpytest() | |||
result.stdout.fnmatch_lines('* 2 passed, 1 xpassed in *') | |||
|
|||
@pytest.mark.filterwarnings('ignore:Applying marks directly to parameters') |
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.
those mark applications are all the same, can we assign a speaking name to that?
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 wonder if those tests should just be using pytest.param
instead?
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.
those mark applications are all the same, can we assign a speaking name to that?
Good idea, will do.
I wonder if those tests should just be using pytest.param instead?
I think we should keep them in to ensure the old method still works, so we should remove them only when we remove the functionality.
Looks like the numpy comparison is broken in some way - a perfect example why I think deprecation warnings should be shown in all testsuites by default, even pytest itself would've benefitted 😉 cc @kalekundert |
Hmm, and there are ResourceWarnings on Windows with trial. |
Heh. Not really broken, but definitely deprecated. I will take a look later, but if someone knows how to do it properly please let me know. I will take a look at the trial errors later as well. 👍 |
I gave it a shot but had no luck, @kalekundert could you take a look and see what's the best way to preserve this functionality? I'm not sure it is possible, it seems they want to deprecate the |
I'll try to give it a look this weekend. |
Awesome, thanks! |
696ca61
to
3eb4b16
Compare
The trial warning seems to be a problem in Twisted, reported a new issue: https://twistedmatrix.com/trac/ticket/9227 |
3eb4b16
to
bda07d8
Compare
Rebased and applied the requested changes. |
1 similar comment
Travis recently has changed its dist from "precise" to "trusty", so some Python versions are no longer installed by default
20f607d
to
d5bb200
Compare
@@ -32,6 +29,12 @@ env: | |||
|
|||
matrix: | |||
include: | |||
- env: TOXENV=py26 |
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.
These changes are required with the migration of Travis images default from Precise to Trusty.
Thanks! |
This fixes #2588
When I started working on this I noticed I needed to control warnings on a per-test level, hence #2598 in which this branch is built on. We should review and consider merging this only if #2598 is.
As a test, I reverted 62556ba locally to see if this change would catch the regression, and indeed 25 tests failed so this seems to do the trick.