File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import absolute_import
2
2
3
- from libmodernize . tests . utils import check_on_input
3
+ from utils import check_on_input
4
4
5
5
6
6
TYPES = 'keys' , 'items' , 'values'
45
45
pass
46
46
""" )
47
47
48
+ DICT_ITER_IN_LIST = ("""\
49
+ for k in list(x.iter{type}()):
50
+ pass
51
+ """ , """\
52
+ from __future__ import absolute_import
53
+ import six
54
+ for k in list(six.iter{type}(x)):
55
+ pass
56
+ """ )
57
+
48
58
CHAINED_CALLS = ("""\
49
59
(x + y).foo().iter{type}().bar()
50
60
""" , """\
@@ -73,5 +83,8 @@ def test_dict_in_loop():
73
83
def test_dict_iter_in_loop ():
74
84
check_all_types (* DICT_ITER_IN_LOOP )
75
85
86
+ def test_dict_iter_in_list ():
87
+ check_all_types (* DICT_ITER_IN_LIST )
88
+
76
89
def test_chained_calls ():
77
90
check_all_types (* CHAINED_CALLS )
You can’t perform that action at this time.
0 commit comments