diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2009-11-16 03:57:32 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2009-11-16 03:57:32 (GMT) |
commit | 4b953bac940f125e8fe0de0a417e1dc0baabf0d5 (patch) | |
tree | a0f6451266a6c8c7951228e91bf8cf466b9682da /Lib | |
parent | 4976e3287a9696fb7b99ca8d757e3af1fdb4f763 (diff) | |
download | cpython-4b953bac940f125e8fe0de0a417e1dc0baabf0d5.zip cpython-4b953bac940f125e8fe0de0a417e1dc0baabf0d5.tar.gz cpython-4b953bac940f125e8fe0de0a417e1dc0baabf0d5.tar.bz2 |
Allow for backslashes in file paths passed to the regex engine
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_runpy.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py index 510bf1e..45c839e 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): |