From: Benjamin Peterson Date: Wed, 1 Mar 2017 06:35:00 +0000 (-0800) Subject: weaken test_from_import_missing_attr_has_name_and_path regular expression (#371) X-Git-Tag: v3.7.0a1~1252 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bee93f2d0465cc3415798e4770c83cbb106473ec;p=python weaken test_from_import_missing_attr_has_name_and_path regular expression (#371) Windows uses backslashes for separators. --- diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index ace1a46f9b..bd92b4739d 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -85,7 +85,7 @@ class ImportTests(unittest.TestCase): from os import i_dont_exist self.assertEqual(cm.exception.name, 'os') self.assertEqual(cm.exception.path, os.__file__) - self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 'os' \(.*/Lib/os.py\)") + self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 'os' \(.*os.py\)") def test_from_import_missing_attr_has_name_and_so_path(self): import _opcode