summaryrefslogtreecommitdiff
path: root/Lib/test/test_warnings
Commit message (Collapse)AuthorAgeFilesLines
* warnings: Fix the issue numberVictor Stinner2016-12-061-2/+2
| | | | The fix for catch_warnings() is the issue #28835 (not the issue #28089).
* catch_warnings() calls showwarning() if overridenVictor Stinner2016-12-061-0/+45
| | | | | Issue #28089: Fix a regression introduced in warnings.catch_warnings(): call warnings.showwarning() if it was overriden inside the context manager.
* Issue #27528: Merge warning doc and test from 3.5Martin Panter2016-07-191-0/+12
|\
| * Issue #27528: Document and test warning messages must match at beginningMartin Panter2016-07-191-0/+12
| |
* | Issue #19527: Fixed tests with defined COUNT_ALLOCS.Serhiy Storchaka2016-07-031-0/+1
|\ \ | |/
| * Issue #19527: Fixed tests with defined COUNT_ALLOCS.Serhiy Storchaka2016-07-031-0/+1
| |
| * first step in backout of bad default->3.5 merge d085b4f779af. Create new ↵Ned Deily2016-06-031-1/+1
| | | | | | | | head and fix whitespace.
* | Merge 3.5 (test_warnings)Victor Stinner2016-05-261-1/+9
|\ \ | |/
| * test_warnings: catch stderr and check warningVictor Stinner2016-05-261-1/+9
| | | | | | | | | | Check the user warning in test_error_after_default() to not pollute the output, and check the warning logged into stderr.
* | Issue #18383: Merge warnings fix from 3.5Martin Panter2016-05-262-1/+46
|\ \ | |/ |/|
| * Issue #21925: Fix test_warnings for release modeVictor Stinner2016-03-251-2/+2
| | | | | | | | Use -Wd comment line option to log the ResourceWarning.
| * Merge 3.5Victor Stinner2016-03-251-6/+26
| |\ | | | | | | | | | | | | | | | Issue #21925: warnings.formatwarning() now catches exceptions when calling linecache.getline() and tracemalloc.get_object_traceback() to be able to log ResourceWarning emitted late during the Python shutdown process.
| * | Issue #26588: remove debug traces from _tracemalloc.Victor Stinner2016-03-221-1/+0
| | |
| * | Issue #26588: skip test_warnings.test_tracemalloc()Victor Stinner2016-03-221-0/+1
| | |
| * | Try again to fix test_warnings on WindowsVictor Stinner2016-03-191-0/+2
| | | | | | | | | | | | Issue #26567: normalize newlines in test_tracemalloc.
| * | Try to fix test_warnings on WindowsVictor Stinner2016-03-191-8/+10
| | | | | | | | | | | | Issue #26567.
| * | On ResourceWarning, log traceback where the object was allocatedVictor Stinner2016-03-191-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26567: * Add a new function PyErr_ResourceWarning() function to pass the destroyed object * Add a source attribute to warnings.WarningMessage * Add warnings._showwarnmsg() which uses tracemalloc to get the traceback where source object was allocated.
| * | Add _showwarnmsg() and _formatwarnmsg() to warningsVictor Stinner2016-03-191-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #26568: add new _showwarnmsg() and _formatwarnmsg() functions to the warnings module. The C function warn_explicit() now calls warnings._showwarnmsg() with a warnings.WarningMessage as parameter, instead of calling warnings.showwarning() with multiple parameters. _showwarnmsg() calls warnings.showwarning() if warnings.showwarning() was replaced. Same for _formatwarnmsg(): call warnings.formatwarning() if it was replaced.
| * | Merge from 3.5Steve Dower2015-09-061-1/+1
| | |
* | | Issue #18383: Avoid adding duplicate filters when warnings is reloadedMartin Panter2016-05-261-0/+47
| | | | | | | | | | | | Based on patch by Alex Shkop.
* | | Issue #21925: Fix test_warnings for release modeVictor Stinner2016-03-251-2/+2
| |/ |/| | | | | Use -Wd comment line option to log the ResourceWarning.
* | warnings.formatwarning(): catch exceptionsVictor Stinner2016-03-251-0/+17
| | | | | | | | | | | | Issue #21925: warnings.formatwarning() now catches exceptions on linecache.getline(...) to be able to log ResourceWarning emitted late during the Python shutdown process.
* | Fix test_warnings.test_improper_option()Victor Stinner2016-03-251-6/+9
|/ | | | | test_warnings: only run test_improper_option() and test_warnings_bootstrap() once. The unit test doesn't depend on self.module.
* Reapplied change to test_warnings.py to test_warnings/__init__.py.Steve Dower2015-09-061-0/+6
|
* Issue #24305: Prevent import subsystem stack frames from being countedLarry Hastings2015-09-064-0/+970
by the warnings.warn(stacklevel=) parameter.