From e07dcb5562c336975e31ce014aa33d2ab1f5ac98 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 30 May 2013 18:17:04 +0100 Subject: [PATCH] Adjusted a testcase for Python 3 --- flask/testsuite/ext.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flask/testsuite/ext.py b/flask/testsuite/ext.py index 1a7a4a5a..5cc3df43 100644 --- a/flask/testsuite/ext.py +++ b/flask/testsuite/ext.py @@ -121,7 +121,10 @@ class ExtImportHookTestCase(FlaskTestCase): self.assert_true(tb.tb_frame.f_globals is globals()) # reraise() adds a second frame so we need to skip that one too. + # On PY3 we even have another one :( next = tb.tb_next.tb_next + if not PY2: + next = next.tb_next self.assert_in('flask_broken/__init__.py', next.tb_frame.f_code.co_filename)