From: Nick Coghlan Date: Mon, 16 Nov 2009 03:57:32 +0000 (+0000) Subject: Allow for backslashes in file paths passed to the regex engine X-Git-Tag: v2.7a1~96 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b953bac940f125e8fe0de0a417e1dc0baabf0d5;p=python Allow for backslashes in file paths passed to the regex engine --- diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py index 510bf1e7ac..45c839e87b 100644 --- a/Lib/test/test_runpy.py +++ b/Lib/test/test_runpy.py @@ -317,6 +317,8 @@ argv0 = sys.argv[0] self.assertEqual(result["__package__"], expected_package) def _check_import_error(self, script_name, msg): + # Double backslashes to handle path separators on Windows + msg = msg.replace("\\", "\\\\") self.assertRaisesRegexp(ImportError, msg, run_path, script_name) def test_basic_script(self):