diff options
author | Anish Shah <shah.anish07@gmail.com> | 2017-03-03 08:12:03 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-03 08:12:03 (GMT) |
commit | 15aa4c88f6052af6279e6be3fcd2f968f1c53eae (patch) | |
tree | d0728f93b1f04fc184a14f44bc35a8c475da5638 /Lib/test/test_import | |
parent | 902e9c50e31209e796b6bbe26f8d2f57ec12071b (diff) | |
download | cpython-15aa4c88f6052af6279e6be3fcd2f968f1c53eae.zip cpython-15aa4c88f6052af6279e6be3fcd2f968f1c53eae.tar.gz cpython-15aa4c88f6052af6279e6be3fcd2f968f1c53eae.tar.bz2 |
bpo-29693: Fix for DeprecationWarning in test_import (#421)
Patch by Anish Shah.
Diffstat (limited to 'Lib/test/test_import')
-rw-r--r-- | Lib/test/test_import/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index 6e8ed36..d4b4445 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -85,7 +85,7 @@ class ImportTests(unittest.TestCase): from os import i_dont_exist self.assertEqual(cm.exception.name, 'os') self.assertEqual(cm.exception.path, os.__file__) - self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 'os' \(.*os.py\)") + self.assertRegex(str(cm.exception), r"cannot import name 'i_dont_exist' from 'os' \(.*os.py\)") def test_from_import_missing_attr_has_name_and_so_path(self): import select @@ -93,7 +93,7 @@ class ImportTests(unittest.TestCase): from select import i_dont_exist self.assertEqual(cm.exception.name, 'select') self.assertEqual(cm.exception.path, select.__file__) - self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 'select' \(.*\.(so|pyd)\)") + self.assertRegex(str(cm.exception), r"cannot import name 'i_dont_exist' from 'select' \(.*\.(so|pyd)\)") def test_from_import_missing_attr_has_name(self): with self.assertRaises(ImportError) as cm: |