summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_exceptions.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-30697: Fix PyErr_NormalizeException() when no memory (GH-2327). ↵xdegaye2017-10-261-2/+101
| | | | | (#4135) (cherry picked from commit 56d1f5ca32892c7643eb8cee49c40c1644f1abfe)
* [3.6] bpo-30817: Fix PyErr_PrintEx() when no memory (GH-2526). (#4107)xdegaye2017-10-241-1/+18
| | | (cherry picked from commit 66caacf2f0d6213b049a3097556e28e30440b900)
* bpo-31161: only check for parens error for SyntaxError (#3083)Martijn Pieters2017-08-221-0/+28
| | | | | Subclasses such as IndentError and TabError should not have this message applied.
* bpo-29998: Pickling and copying ImportError now preserves name and path ↵Serhiy Storchaka2017-04-081-0/+20
| | | | | | (#1010) (#1042) attributes. (cherry picked from commit b785396ab451b0c9d6ae9ee5a9e56c810209a6cb)
* Issue #21578: Fixed misleading error message when ImportError called withSerhiy Storchaka2016-09-271-0/+16
|\ | | | | | | invalid keyword args.
| * Issue #21578: Fixed misleading error message when ImportError called withSerhiy Storchaka2016-09-271-0/+17
|/ | | | invalid keyword args.
* Issue #22836: Keep exception reports sensible despite errorsMartin Panter2016-02-281-2/+66
|
* Issue #23391: Merge OSError doc from 3.4 into 3.5Martin Panter2015-10-261-5/+12
|\
| * Issue #23391: Restore OSError constructor argument documentationMartin Panter2015-10-261-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores details lost in revision 097f4fda61a4 (since Python 3.3, related to the new OSError subclasses). Further additions: * Markup for attributes and constructor signature * Explain "winerror" and "filename2" * Extend test to check for filename2 defaulting to None * Clarify that the constructor can return a subclass I have intentionally left out any details of allowing more than five arguments, or how the "args" attribute is set for four or more arguments. These details seem to be dependent on the Python version and platform.
* | Add a rudimentary test for StopAsyncIteration in test_exceptions.Yury Selivanov2015-07-031-0/+2
| |
* | Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.Yury Selivanov2015-07-031-6/+7
|/
* Issue #22977: Remove unconditional import of ctypes.Serhiy Storchaka2015-04-061-1/+0
|
* Issue #22977: Fix test_exceptionsVictor Stinner2015-04-021-5/+8
|
* Issue #22977: Fixed formatting Windows error messages on Wine.Serhiy Storchaka2015-04-021-1/+9
| | | | Patch by Martin Panter.
* Issue #23353: improve exceptions tests for generatorsAntoine Pitrou2015-03-181-0/+46
|
* make sure to test UnicodeEncodeError, tooBenjamin Peterson2014-04-021-1/+1
|
* bail in unicode error's __str__ methods if the objects are not properly ↵Benjamin Peterson2014-04-021-0/+6
| | | | initialized (closes #21134)
* make test name consistent with the rest of the fileBenjamin Peterson2014-04-021-1/+1
|
* Issue #20517: Functions in the os module that accept two filenamesLarry Hastings2014-02-101-2/+2
| | | | | | now register both filenames in the exception on failure. This required adding new C API functions allowing OSError exceptions to reference two filenames instead of one.
* Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-0/+2
|\
| * Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-0/+2
| |
| * Silence BytesWarning (backport 267a4d4d9d65).Serhiy Storchaka2014-02-061-5/+6
| |
* | Issue #2382: SyntaxError cursor "^" now is written at correct position in mostSerhiy Storchaka2014-01-211-0/+13
|\ \ | |/ | | | | | | cases when multibyte characters are in line (before "^"). This still not works correctly with wide East Asian characters.
| * Issue #2382: SyntaxError cursor "^" now is written at correct position in mostSerhiy Storchaka2014-01-211-0/+13
| | | | | | | | | | cases when multibyte characters are in line (before "^"). This still not works correctly with wide East Asian characters.
* | Remove dead code in test_exceptions.Brett Cannon2013-07-041-3/+0
| |
* | Issue #15767: back out 8a0ed9f63c6e, finishing the removal ofBrett Cannon2013-07-041-0/+3
| | | | | | | | ModuleNotFoundError.
* | Issue #15767: Introduce ModuleNotFoundError, a subclass ofBrett Cannon2013-06-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImportError. The exception is raised by import when a module could not be found. Technically this is defined as no viable loader could be found for the specified module. This includes ``from ... import`` statements so that the module usage is consistent for all situations where import couldn't find what was requested. This should allow for the common idiom of:: try: import something except ImportError: pass to be updated to using ModuleNotFoundError and not accidentally mask ImportError messages that should propagate (e.g. issues with a loader). This work was driven by the fact that the ``from ... import`` statement needed to be able to tell the difference between an ImportError that simply couldn't find a module (and thus silence the exception so that ceval can raise it) and an ImportError that represented an actual problem.
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-4/+4
| |
* | Get rig of EnvironmentError (#16705)Andrew Svetlov2012-12-171-3/+3
| |
* | merge 3.3Philip Jenvey2012-11-141-5/+10
|\ \ | |/
| * merge 3.2Philip Jenvey2012-11-141-5/+10
| |\
| | * don't gc_collect on CPython to guarantee a lack of ref cycles (thanks Antoine)Philip Jenvey2012-11-141-5/+9
| | |
* | | merge 3.3Philip Jenvey2012-11-131-0/+3
|\ \ \ | |/ /
| * | merge 3.2Philip Jenvey2012-11-131-0/+3
| |\ \ | | |/
| | * add gc_collects to weakref testsPhilip Jenvey2012-11-131-0/+3
| | |
* | | Clean up some warnings in test suite output.Nadeem Vawda2012-10-131-4/+5
|/ /
* | Issue #15784: Modify OSError.__str__() to better distinguish betweenRichard Oudkerk2012-08-281-2/+2
| | | | | | | | errno error numbers and Windows error numbers.
* | Issue #15778: Coerce ImportError.args to a string when it isn'tBrett Cannon2012-08-241-0/+5
| | | | | | | | | | | | already one. Patch by Dave Malcolm.
* | Issue #1692335: Move initial args assignment to BaseException.__new__Richard Oudkerk2012-07-281-1/+15
| | | | | | | | to help pickling of naive subclasses.
* | PEP 415: Implement suppression of __context__ display with an exception ↵Benjamin Peterson2012-05-151-7/+8
| | | | | | | | | | | | attribute This replaces the original PEP 409 implementation. See #14133.
* | Issue #1559549: Add 'name' and 'path' attributes to ImportError.Brett Cannon2012-04-131-1/+23
| | | | | | | | | | | | | | | | Currently import does not use these attributes as they are planned for use by importlib (which will be another commit). Thanks to Filip Gruszczyński for the initial patch and Brian Curtin for refining it.
* | - Issue #14177: marshal.loads() now raises TypeError when given an unicodeAntoine Pitrou2012-03-031-1/+1
|\ \ | |/ | | | | string. Patch by Guilherme Gonçalves.
| * Issue #14177: marshal.loads() now raises TypeError when given an unicode string.Antoine Pitrou2012-03-031-1/+1
| | | | | | | | Patch by Guilherme Gonçalves.
* | Close issue #6210: Implement PEP 409Nick Coghlan2012-02-261-6/+23
| |
* | PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.Antoine Pitrou2011-10-121-9/+34
| |
* | Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is nowAntoine Pitrou2011-09-011-0/+8
|\ \ | |/ | | | | mapped to POSIX errno ENOTDIR (previously EINVAL).
| * Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is nowAntoine Pitrou2011-09-011-0/+8
| | | | | | | | mapped to POSIX errno ENOTDIR (previously EINVAL).
* | Issue #12791: Break reference cycles early when a generator exits with an ↵Antoine Pitrou2011-08-201-0/+62
|\ \ | |/ | | | | exception.
| * Issue #12791: Break reference cycles early when a generator exits with an ↵Antoine Pitrou2011-08-201-0/+62
| | | | | | | | exception.
* | merge 3.2Benjamin Peterson2011-07-031-0/+12
|\ \ | |/