File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,13 +90,14 @@ def test_from_import_missing_attr_has_name_and_path(self):
9090 self .assertEqual (cm .exception .path , os .__file__ )
9191 self .assertRegex (str (cm .exception ), r"cannot import name 'i_dont_exist' from 'os' \(.*os.py\)" )
9292
93+ @cpython_only
9394 def test_from_import_missing_attr_has_name_and_so_path (self ):
94- import select
95+ import _testcapi
9596 with self .assertRaises (ImportError ) as cm :
96- from select import i_dont_exist
97- self .assertEqual (cm .exception .name , 'select ' )
98- self .assertEqual (cm .exception .path , select .__file__ )
99- self .assertRegex (str (cm .exception ), r"cannot import name 'i_dont_exist' from 'select ' \(.*\.(so|pyd)\)" )
97+ from _testcapi import i_dont_exist
98+ self .assertEqual (cm .exception .name , '_testcapi ' )
99+ self .assertEqual (cm .exception .path , _testcapi .__file__ )
100+ self .assertRegex (str (cm .exception ), r"cannot import name 'i_dont_exist' from '_testcapi ' \(.*\.(so|pyd)\)" )
100101
101102 def test_from_import_missing_attr_has_name (self ):
102103 with self .assertRaises (ImportError ) as cm :
You can’t perform that action at this time.
0 commit comments