tests: Allow tests to pass against CPython 3.5.

All breaking changes going from 3.4 to 3.5 are contained in
basics/python34.py.
This commit is contained in:
Damien George
2015-10-02 13:01:47 +01:00
parent 9e0a3d46b6
commit 34f26ea862
7 changed files with 35 additions and 14 deletions

View File

@@ -4,7 +4,7 @@ if hasattr(sys, 'print_exception'):
print_exception = sys.print_exception
else:
import traceback
print_exception = lambda e, f: traceback.print_exception(None, e, None, file=f)
print_exception = lambda e, f: traceback.print_exception(None, e, sys.exc_info()[2], file=f)
def print_exc(e):
buf = io.StringIO()