Skip to content

re-enable all warnings by default #1191

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

Closed
nicoddemus opened this issue Nov 24, 2015 · 8 comments
Closed

re-enable all warnings by default #1191

nicoddemus opened this issue Nov 24, 2015 · 8 comments
Assignees
Milestone

Comments

@nicoddemus
Copy link
Member

From @hunse in #1190

For interest, here's the reasoning on why DeprecationWarnings are suppressed by default. It looks like unittest re-enables them; maybe pytest should do the same?

@The-Compiler
Copy link
Member

Should we do this for 3.0 as it's backwards-incompatible but probably relatively straightforward? Or do we just recommend people to use pytest-warnings and -Wall if they want warnings?

@RonnyPfannschmidt RonnyPfannschmidt modified the milestones: 3.1.0, 3.0 Aug 5, 2016
@RonnyPfannschmidt
Copy link
Member

i think we discussed having it in pytest-warnings for now - @fschulze might recall more details

@fschulze
Copy link
Contributor

fschulze commented Aug 6, 2016

For 3.0 we should recommend pytest-warnings, which will eventually be integrated into pytest.

@nicoddemus
Copy link
Member Author

This task is actually for enabling general warnings by default, I think we should do it in 3.0 as it should be simple enough. I will get to it this week.

@nicoddemus nicoddemus modified the milestones: 3.0, 3.1.0 Aug 6, 2016
@nicoddemus nicoddemus self-assigned this Aug 6, 2016
@nicoddemus
Copy link
Member Author

Just to add more information, here's the full disclosure on how warnings are now handled. The interesting bit here is this:

The unittest module also automatically reenables deprecation warnings when running tests.

@fschulze
Copy link
Contributor

For 3.0 we decided to only show the pytest internal warnings by default. We hadn't decided on how to handle DeprecationWarnings yet, neither in tests, nor in pytest itself. That's why we wanted to recommend pytest-warnings.

If you just enable them like unittest does, then tests that capture output are likely to break.

For 3.0 I wouldn't change anything regarding the warnings module.

@nicoddemus
Copy link
Member Author

If you just enable them like unittest does, then tests that capture output are likely to break.

Believe me, just by enabling to show pytest-warnings by default some test suites will break already (some tests at work which used testdir to test fixtures for example). 😉

But I agree that this could be done in 3.1, where we could do all warnings changes we planned:

Moving this (as well as the others above) to milestone 3.1.

@nicoddemus nicoddemus modified the milestones: 3.1.0, 3.0 Aug 10, 2016
@nicoddemus
Copy link
Member Author

Fixed by #2072.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants