Turn warnings into errors WIP, waiting #2598#2599
Turn warnings into errors WIP, waiting #2598#2599The-Compiler merged 3 commits intopytest-dev:featuresfrom
Conversation
| with pytest.deprecated_call(): | ||
| f() | ||
|
|
||
| def test_deprecated_function_already_called(self, testdir): |
There was a problem hiding this comment.
Realized that this test is already covered by test_deprecated_call_modes so it was redundant.
| 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.
those mark applications are all the same, can we assign a speaking name to that?
There was a problem hiding this comment.
I wonder if those tests should just be using pytest.param instead?
There was a problem hiding this comment.
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
|
|
||
| matrix: | ||
| include: | ||
| - env: TOXENV=py26 |
There was a problem hiding this comment.
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.