From: Benjamin Peterson Date: Wed, 1 Mar 2017 07:14:09 +0000 (-0800) Subject: use select instead of _opcode for import test (#372) X-Git-Tag: v3.7.0a1~1251 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=371963dabadee8bccad27f82b451ff714935f0e8;p=python use select instead of _opcode for import test (#372) --- diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index bd92b4739d..6e8ed3686d 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: