From: Brett Cannon Date: Fri, 20 Apr 2012 16:59:59 +0000 (-0400) Subject: Issue #14633: Simplify imp.find_modue() test after fixes from issue X-Git-Tag: v3.3.0a3~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd9a56953e561076b5573d53f6e4fdd7f42b208c;p=python Issue #14633: Simplify imp.find_modue() test after fixes from issue #14629 changed the message. --- diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index cd34a46a18..432ca41bd2 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -59,10 +59,8 @@ class ImportTests(unittest.TestCase): self.assertEqual(fd.encoding, encoding) path = [os.path.dirname(__file__)] - self.assertRaisesRegex(SyntaxError, - r"Non-UTF-8 code starting with '\\xf6'" - r" in file .*badsyntax_pep3120.py", - imp.find_module, 'badsyntax_pep3120', path) + with self.assertRaises(SyntaxError): + imp.find_module('badsyntax_pep3120', path) def test_issue1267(self): for mod, encoding, _ in self.test_strings: