mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
Allow for backslashes in file paths passed to the regex engine
This commit is contained in:
parent
4976e3287a
commit
4b953bac94
1 changed files with 2 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue