From 3f80b0fd6c054d924c41a3c91152ec1984d8c28c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Neuha=CC=88user?= Date: Wed, 22 May 2013 21:03:01 +0200 Subject: [PATCH] module name is quoted in ImportErrors on 3.x --- flask/testsuite/ext.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flask/testsuite/ext.py b/flask/testsuite/ext.py index 04226181..f6209c67 100644 --- a/flask/testsuite/ext.py +++ b/flask/testsuite/ext.py @@ -12,6 +12,7 @@ import sys import unittest from flask.testsuite import FlaskTestCase +from flask._compat import PY2 from six.moves import reload_module class ExtImportHookTestCase(FlaskTestCase): @@ -109,7 +110,11 @@ class ExtImportHookTestCase(FlaskTestCase): except ImportError: exc_type, exc_value, tb = sys.exc_info() self.assert_true(exc_type is ImportError) - self.assert_equal(str(exc_value), 'No module named missing_module') + if PY2: + message = 'No module named missing_module' + else: + message = 'No module named \'missing_module\'' + self.assert_equal(str(exc_value), message) self.assert_true(tb.tb_frame.f_globals is globals()) next = tb.tb_next