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 510bf1e..45c839e 100644
--- a/Lib/test/test_runpy.py
+++ b/Lib/test/test_runpy.py
@@ -317,6 +317,8 @@
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):