mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
weaken test_from_import_missing_attr_has_name_and_path regular expression (#371)
Windows uses backslashes for separators.
This commit is contained in:
parent
680e20beee
commit
bee93f2d04
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ class ImportTests(unittest.TestCase):
|
||||||
from os import i_dont_exist
|
from os import i_dont_exist
|
||||||
self.assertEqual(cm.exception.name, 'os')
|
self.assertEqual(cm.exception.name, 'os')
|
||||||
self.assertEqual(cm.exception.path, os.__file__)
|
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):
|
def test_from_import_missing_attr_has_name_and_so_path(self):
|
||||||
import _opcode
|
import _opcode
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue