From 90a19465292156e0e2ce0155181065b74b225162 Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Sat, 11 May 2019 12:28:41 +0200 Subject: [PATCH] Newest python versions have different repr for exceptions, avoid altogether --- tests/samples/exception.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/samples/exception.py b/tests/samples/exception.py index bf90979..8b36042 100644 --- a/tests/samples/exception.py +++ b/tests/samples/exception.py @@ -8,8 +8,8 @@ def foo(): def bar(): try: foo() - except Exception as e: - str(e) + except Exception: + str(1) raise @@ -35,9 +35,8 @@ expected_output = ''' Call ended by exception 12:18:08.018494 exception 10 foo() TypeError: bad - 12:18:08.018545 line 11 except Exception as e: - New var:....... e = TypeError('bad',) - 12:18:08.018597 line 12 str(e) + 12:26:33.942623 line 11 except Exception: + 12:26:33.942674 line 12 str(1) 12:18:08.018655 line 13 raise Call ended by exception 12:18:08.018718 exception 19 bar()