summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_raise.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-37069: tests use catch_unraisable_exception() (GH-13762)Victor Stinner2019-06-031-1/+4
| | | | | | | | | | | | | Modify test_coroutines, test_cprofile, test_generators, test_raise, test_ssl and test_yield_from to use support.catch_unraisable_exception() rather than support.captured_stderr(). test_thread: remove test_save_exception_state_on_error() which is now updated. test_unraisable_exception() checks that sys.unraisablehook() is called to handle _thread.start_new_thread() exception. test_cprofile now rely on unittest for test discovery: replace support.run_unittest() with unittest.main().
* bpo-30579: Allow TracebackType creation and tb_next mutation from Python ↵Nathaniel J. Smith2018-01-071-0/+66
| | | | | | | | | | | | | | | | | (GH-4793) Third party projects may wish to hide their own internal machinery in order to present more comprehensible tracebacks to end users (e.g. Jinja2 and Trio both do this). Previously such projects have had to rely on ctypes to do so: https://github.com/pallets/jinja/blob/fe3dadacdf4cf411d0a5b6bbd4d5234697a28af2/jinja2/debug.py#L345 https://github.com/python-trio/trio/blob/1e86b1aee8c0c759f6f239ae53a05d0d3963c629/trio/_core/_multierror.py#L296 This provides a Python level API for creating and modifying real Traceback objects, allowing tracebacks to be edited at runtime. Patch by Nathaniel Smith.
* bpo-20548: Use specific asserts in warnings and exceptions tests (#788)Serhiy Storchaka2017-03-301-6/+6
|
* Remove unused imports.Serhiy Storchaka2016-12-161-1/+0
|
* Issue #21741: Update 147 test modules to use test discovery.Zachary Ware2015-04-131-3/+0
| | | | | | | I have compared output between pre- and post-patch runs of these tests to make sure there's nothing missing and nothing broken, on both Windows and Linux. The only differences I found were actually tests that were previously *not* run.
* Close #14136 by cleaning up the PEP 409 command line test (patch by Ethan ↵Nick Coghlan2012-05-211-52/+1
| | | | Furman)
* PEP 415: Implement suppression of __context__ display with an exception ↵Benjamin Peterson2012-05-151-2/+5
| | | | | | attribute This replaces the original PEP 409 implementation. See #14133.
* Close issue #6210: Implement PEP 409Nick Coghlan2012-02-261-1/+81
|
* add a test for an assertion with tuple msgBenjamin Peterson2011-10-271-0/+7
|
* catch nasty exception classes with __new__ that doesn't return a exception ↵Benjamin Peterson2011-07-151-0/+9
| | | | | | (closes #11627) Patch from Andreas Stührk.
* Merged revisions 77727 via svnmerge fromEzio Melotti2010-01-241-10/+10
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line use assert[Not]IsInstance where appropriate ........
* use assert[Not]In where appropriateBenjamin Peterson2010-01-191-2/+2
| | | | A patch from Dave Malcolm.
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-17/+17
|
* Issue 3611: in some cases (a __del__ re-raising an exception, when called ↵Amaury Forgeot d'Arc2008-08-291-0/+24
| | | | | | | | | | | | | from inside an 'except' clause), the exception __context__ would be reset to None. This crases the interpreter if this precisely happens inside PyErr_SetObject. - now the __context__ is properly preserved - in any case, PyErr_SetObject now saves the current exc_value in a local variable, to avoid such crashes in the future. Reviewer: Antoine Pitrou.
* move test to a better locationBenjamin Peterson2008-08-211-0/+22
|
* implement chained exception tracebacksBenjamin Peterson2008-07-151-0/+24
| | | | patch from Antoine Pitrou #3112
* Implicit exception chaining via __context__ (PEP 3134).Guido van Rossum2008-06-141-26/+96
| | | | Patch 3108 by Antooine Pitrou.
* #3021: Antoine Pitrou's Lexical exception handlersBenjamin Peterson2008-06-111-1/+72
|
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-2/+2
|
* Fix refleaks exposed by test_raise.Collin Winter2007-09-011-0/+24
|
* Cut test_raise down to size.Collin Winter2007-08-311-278/+0
|
* Issue #1066: implement PEP 3109, 2/3 of PEP 3134.Collin Winter2007-08-311-0/+417