]> granicus.if.org Git - python/commitdiff
Issue #14633: Simplify imp.find_modue() test after fixes from issue
authorBrett Cannon <brett@python.org>
Fri, 20 Apr 2012 16:59:59 +0000 (12:59 -0400)
committerBrett Cannon <brett@python.org>
Fri, 20 Apr 2012 16:59:59 +0000 (12:59 -0400)
#14629 changed the message.

Lib/test/test_imp.py

index cd34a46a18df5c32def6eb862e172cfc291885ba..432ca41bd2685ad69c3b0afbe6eb22f019d86068 100644 (file)
@@ -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: