File tree Expand file tree Collapse file tree 2 files changed +23
-17
lines changed Expand file tree Collapse file tree 2 files changed +23
-17
lines changed Original file line number Diff line number Diff line change 1+ sudo : false
12language : python
23
3- python :
4- - " 2.7"
5- - " 3.3"
6- - " 3.4"
7- - " 3.5"
8- - " 3.6"
9-
10- os :
11- - linux
4+ matrix :
5+ include :
6+ - python : " 2.7"
7+ env : SETUPTOOLS=setuptools
8+ - python : " 3.3"
9+ env : SETUPTOOLS=setuptools~=39.2
10+ - python : " 3.4"
11+ env : SETUPTOOLS=setuptools
12+ - python : " 3.5"
13+ env : SETUPTOOLS=setuptools
14+ - python : " 3.6"
15+ env : SETUPTOOLS=setuptools
1216
1317before_install :
14- - pip install setuptools pip -U
18+ - pip install $SETUPTOOLS pip -U
1519 - pip --version
1620 - pip install -r testrequirements.txt
1721 - pip freeze
Original file line number Diff line number Diff line change @@ -216,17 +216,19 @@ def test_entry_point_type_error(self):
216216
217217 def test_entry_point_create_error (self ):
218218
219+ class BadOpener (opener .Opener ):
220+ def __init__ (self , * args , ** kwargs ):
221+ raise ValueError ("some creation error" )
222+ def open_fs (self , * args , ** kwargs ):
223+ pass
224+
219225 entry_point = mock .MagicMock ()
220- entry_point .load = mock .MagicMock (return_value = entry_point )
221- entry_point .side_effect = ValueError ("some creation error" )
222-
226+ entry_point .load = mock .MagicMock (return_value = BadOpener )
223227 iter_entry_points = mock .MagicMock (return_value = iter ([entry_point ]))
224- builtins = 'builtins' if six .PY3 else '__builtin__'
225228
226229 with mock .patch ('pkg_resources.iter_entry_points' , iter_entry_points ):
227- with mock .patch (builtins + '.issubclass' , return_value = True ):
228- with self .assertRaises (errors .EntryPointError ) as ctx :
229- opener .open_fs ('test://' )
230+ with self .assertRaises (errors .EntryPointError ) as ctx :
231+ opener .open_fs ('test://' )
230232 self .assertEqual (
231233 'could not instantiate opener; some creation error' , str (ctx .exception ))
232234
You can’t perform that action at this time.
0 commit comments