diff options
author | Benjamin Peterson <benjamin@python.org> | 2017-03-01 07:14:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-01 07:14:09 (GMT) |
commit | 371963dabadee8bccad27f82b451ff714935f0e8 (patch) | |
tree | 83341954ca32129a90836fd31bcf05463ce8137d | |
parent | bee93f2d0465cc3415798e4770c83cbb106473ec (diff) | |
download | cpython-371963dabadee8bccad27f82b451ff714935f0e8.zip cpython-371963dabadee8bccad27f82b451ff714935f0e8.tar.gz cpython-371963dabadee8bccad27f82b451ff714935f0e8.tar.bz2 |
use select instead of _opcode for import test (#372)
-rw-r--r-- | Lib/test/test_import/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index bd92b47..6e8ed36 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -88,12 +88,12 @@ class ImportTests(unittest.TestCase): 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): - import _opcode + import select with self.assertRaises(ImportError) as cm: - from _opcode import i_dont_exist - self.assertEqual(cm.exception.name, '_opcode') - self.assertEqual(cm.exception.path, _opcode.__file__) - self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from '_opcode' \(.*\.(so|dll)\)") + 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)\)") def test_from_import_missing_attr_has_name(self): with self.assertRaises(ImportError) as cm: |