File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ def test_init(self):
32
32
self .assertEqual (a , b )
33
33
34
34
def test_getitem_error (self ):
35
- a = []
35
+ a = self . type2test ([])
36
36
msg = "list indices must be integers or slices"
37
37
with self .assertRaisesRegex (TypeError , msg ):
38
38
a ['a' ]
39
39
40
40
def test_setitem_error (self ):
41
- a = []
41
+ a = self . type2test ([])
42
42
msg = "list indices must be integers or slices"
43
43
with self .assertRaisesRegex (TypeError , msg ):
44
44
a ['a' ] = "python"
@@ -561,7 +561,7 @@ def test_constructor_exception_handling(self):
561
561
class F (object ):
562
562
def __iter__ (self ):
563
563
raise KeyboardInterrupt
564
- self .assertRaises (KeyboardInterrupt , list , F ())
564
+ self .assertRaises (KeyboardInterrupt , self . type2test , F ())
565
565
566
566
def test_exhausted_iterator (self ):
567
567
a = self .type2test ([1 , 2 , 3 ])
You can’t perform that action at this time.
0 commit comments