summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_traceback.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30445: Allow appended output in RecursionError message (#3356)Victor Stinner2017-09-051-1/+2
| | | | | | | Running under coverage sometimes causes 'in comparison' to be added to the end of the RecursionError message, which is acceptable. Patched by Maria Mckinley (cherry picked from commit 3480ef9dd3177be8c0d71a74853dca6e5b11fbe1)
* Issue #25783: Fixed test_traceback when run directly (without regrtest).Serhiy Storchaka2016-10-071-2/+6
|\
| * Issue #25783: Fixed test_traceback when run directly (without regrtest).Serhiy Storchaka2016-10-071-2/+6
| |
* | Issue #27348: Merge exception formatting fix from 3.5 into 3.6Martin Panter2016-09-221-5/+12
|\ \ | |/
| * Issue #27348: Restore “Exception: None” formatting in traceback moduleMartin Panter2016-09-221-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression caused by revision 73afda5a4e4c. Also reverts the decimal test workaround added in revision 5f3dd0a2b1ab. Remove test_without_exception(). According to revision ecaafc32c500, this was added in Python 2 so that print_exc() would output “None” when called with no exception set. However print_exc() never worked like this in Python 3, and the use case is not documented. Restore TracebackCases class name (instead of SyntaxTracebackCases), because the class also tests other exceptions.
* | Issue #27213: Fixed different issues with reworked CALL_FUNCTION* opcodes.Serhiy Storchaka2016-09-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | * BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK_WITH_CALL no longer generated with single tuple or dict. * Restored more informative error messages for incorrect var-positional and var-keyword arguments. * Removed code duplications in _PyEval_EvalCodeWithName(). * Removed redundant runtime checks and parameters in _PyStack_AsDict(). * Added a workaround and enabled previously disabled test in test_traceback. * Removed dead code from the dis module.
* | Issue 27948: Allow backslashes in the literal string portion of f-strings, ↵Eric V. Smith2016-09-101-14/+14
| | | | | | | | but not in the expressions. Also, require expressions to begin and end with literal curly braces.
* | Rework CALL_FUNCTION* opcodesVictor Stinner2016-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #27213: Rework CALL_FUNCTION* opcodes to produce shorter and more efficient bytecode: * CALL_FUNCTION now only accepts position arguments * CALL_FUNCTION_KW accepts position arguments and keyword arguments, but keys of keyword arguments are packed into a constant tuple. * CALL_FUNCTION_EX is the most generic, it expects a tuple and a dict for positional and keyword arguments. CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW opcodes have been removed. 2 tests of test_traceback are currently broken: skip test, the issue #28050 was created to track the issue. Patch by Demur Rumed, design by Serhiy Storchaka, reviewed by Serhiy Storchaka and Victor Stinner.
* | Issue 27921: Remove backslash from another f-string. I'll revert this change ↵Eric V. Smith2016-09-031-14/+14
| | | | | | | | before beta 2.
* | Issue #26823: Abbreviate recursive tracebacksNick Coghlan2016-08-151-0/+131
| | | | | | | | | | | | | | | | Large sections of repeated lines in tracebacks are now abbreviated as "[Previous line repeated {count} more times]" by both the traceback module and the builtin traceback rendering. Patch by Emanuel Barry.
* | 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
| |
* | Additional grammar fixMartin Panter2016-04-191-1/+1
| |
* | Replace noop constant statement with expressionVictor Stinner2016-02-081-7/+7
|/ | | | | | | | | | * Constant statements will be ignored and the compiler will emit a SyntaxWarning. * Replace constant statement (ex: "1") with an expression statement (ex: "x=1"). * test_traceback: use context manager on the file. Issue #26204.
* Issue #25111: Fixed comparison of traceback.FrameSummary.Serhiy Storchaka2015-09-291-5/+11
|
* Issue #25108: Omitted internal frames in traceback functions print_stack(),Serhiy Storchaka2015-09-181-0/+35
| | | | format_stack(), and extract_stack() called without arguments.
* Issue #24695: Fix a regression in traceback.print_exception()Berker Peksag2015-07-241-0/+13
| | | | | If exc_traceback is None we shouldn't print a traceback header like described in the documentation.
* Issue #9517: Move script_helper to the support package.Berker Peksag2015-05-061-1/+1
| | | | Patch by Christie Wilson.
* Issue #22619: Added negative limit support in the traceback module.Serhiy Storchaka2015-05-031-4/+123
| | | | Based on patch by Dmitry Kazakov.
* Issue #23883: Add missing entries to traceback.__all__.Berker Peksag2015-04-081-7/+16
|
* Issue #23631: Fix traceback.format_list when a traceback has been mutated.Robert Collins2015-03-161-1/+9
|
* Issue #22936: Make it possible to show local variables in tracebacks.Robert Collins2015-03-051-8/+60
|
* Fix brownbag in issue 17911 commitRobert Collins2015-03-041-3/+2
|
* Issue #17911: traceback module overhaulRobert Collins2015-03-041-0/+196
| | | | | | | | | Provide a way to seed the linecache for a PEP-302 module without actually loading the code. Provide a new object API for traceback, including the ability to not lookup lines at all until the traceback is actually rendered, without any trace of the original objects being kept alive.
* (Merge 3.4) Issue #22599: Enhance tokenize.open() to be able to call it duringVictor Stinner2014-12-051-0/+33
|\ | | | | | | | | | | | | | | | | | | | | | | | | Python finalization. Before the module kept a reference to the builtins module, but the module attributes are cleared during Python finalization. Instead, keep directly a reference to the open() function. This enhancement is not perfect, calling tokenize.open() can still fail if called very late during Python finalization. Usually, the function is called by the linecache module which is called to display a traceback or emit a warning.
* | Issue #22032: __qualname__ instead of __name__ is now always used to formatSerhiy Storchaka2014-07-221-2/+2
|/ | | | fully qualified class names of Python implemented classes.
* Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-2/+5
|\
| * Issue #20532: Tests which use _testcapi now are marked as CPython only.Serhiy Storchaka2014-02-071-2/+5
| |
* | Issue #17825: Cursor ^ is correctly positioned for SyntaxError and ↵Florent Xicluna2014-01-221-4/+14
|\ \ | |/ | | | | IndentationError.
| * Issue #17825: Cursor ^ is correctly positioned for SyntaxError and ↵Florent Xicluna2014-01-221-4/+14
| | | | | | | | IndentationError.
* | Issue #2382: SyntaxError cursor "^" now is written at correct position in mostSerhiy Storchaka2014-01-211-0/+9
|\ \ | |/ | | | | | | 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/+9
| | | | | | | | | | cases when multibyte characters are in line (before "^"). This still not works correctly with wide East Asian characters.
* | Do not reset the line number because we already set file position to correctSerhiy Storchaka2014-01-091-0/+4
|\ \ | |/ | | | | | | | | value. (fixes error in patch for issue #18960)
| * Do not reset the line number because we already set file position to correctSerhiy Storchaka2014-01-091-0/+4
| | | | | | | | | | | | value. (fixes error in patch for issue #18960)
* | #1565525: Add traceback.clear_frames() helper function to clear locals ref'd ↵Andrew Kuchling2013-09-151-0/+30
| | | | | | | | by a traceback
* | Issue #17934: Add a clear() method to frame objects, to help clean up ↵Antoine Pitrou2013-08-051-4/+20
| | | | | | | | expensive details (local variables) and break reference cycles.
* | refactor traceback.py to reduce code duplication (closes #17646)Benjamin Peterson2013-04-291-0/+28
|/ | | | Patch by Martin Morrison.
* Close issue #6210: Implement PEP 409Nick Coghlan2012-02-261-0/+15
|
* #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-12/+12
|
* decrement offset when it points to a newline (#10186 followup)Benjamin Peterson2010-10-291-0/+4
|
* remove broken code accounting an offset the size of the line #10186Benjamin Peterson2010-10-241-0/+6
|
* rewrite nocaret test to not rely on a specific SyntaxErrorBenjamin Peterson2010-09-201-11/+4
|
* use assert[Not]In where appropriateEzio Melotti2010-01-231-2/+2
|
* use assert[Not]In where appropriateBenjamin Peterson2010-01-191-10/+10
| | | | A patch from Dave Malcolm.
* Issue #4486: When an exception has an explicit cause, do not print its ↵Antoine Pitrou2009-11-281-0/+20
| | | | implicit context too.
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-25/+25
|
* Merged revisions 73232 via svnmerge fromGeorg Brandl2009-06-041-0/+9
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73232 | georg.brandl | 2009-06-04 20:59:58 +0200 (Do, 04 Jun 2009) | 1 line Add test for #3684. ........
* Merged revisions 71237-71238 via svnmerge fromGeorg Brandl2009-04-051-12/+17
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71237 | georg.brandl | 2009-04-05 16:24:52 +0200 (So, 05 Apr 2009) | 1 line #1326077: fix traceback formatting of SyntaxErrors. This fixes two differences with formatting coming from Python: a) the reproduction of location details in the error message if no line text is given, b) the prefixing of the last line by one space. ........ r71238 | georg.brandl | 2009-04-05 16:25:41 +0200 (So, 05 Apr 2009) | 1 line Add NEWS entry for r71237. ........
* Issues #2384 and #3975: Tracebacks were not correctly printed when the ↵Amaury Forgeot d'Arc2008-10-091-0/+65
| | | | | | | | source file contains a ``coding:`` header: the wrong line was displayed, and the encoding was not respected. Patch by Victor Stinner.
* implement chained exception tracebacksBenjamin Peterson2008-07-151-6/+130
| | | | patch from Antoine Pitrou #3112