diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-07-01 15:11:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-01 15:11:15 (GMT) |
commit | 2683ded568b24fff1139edd9127a349f432292a6 (patch) | |
tree | b7919a4b503b8e13a883579d0b3395c5e904e262 /Lib/difflib.py | |
parent | e224d2865aa0f021b25d68de9a6c2be617341f4c (diff) | |
download | cpython-2683ded568b24fff1139edd9127a349f432292a6.zip cpython-2683ded568b24fff1139edd9127a349f432292a6.tar.gz cpython-2683ded568b24fff1139edd9127a349f432292a6.tar.bz2 |
bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504)
Fix sys.excepthook() and PyErr_Display() if a filename is a bytes
string. For example, for a SyntaxError exception where the filename
attribute is a bytes string.
Cleanup also test_sys:
* Sort imports.
* Rename numruns global var to INTERN_NUMRUNS.
* Add DisplayHookTest and ExceptHookTest test case classes.
* Don't save/restore sys.stdout and sys.displayhook using
setUp()/tearDown(): do it in each test method.
* Test error case (call hook with no argument) after the success case.
(cherry picked from commit f9b7457bd7f438263e0d2dd1f70589ad56a2585e)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Diffstat (limited to 'Lib/difflib.py')
0 files changed, 0 insertions, 0 deletions