Skip to content

Commit

Permalink
add test for index in iteration context Refs amyreese#12
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed May 18, 2020
1 parent 4346ab2 commit c6494a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fissix/tests/test_fixers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3158,6 +3158,10 @@ def test_map_trailers(self):
a = """x = list(map(f, 'abc'))[0][1]"""
self.check(b, a)

b = """x = set(map(f, 'abc')[0])"""
b = """x = set(list(map(f, 'abc'))[0])"""
self.check(b, a)

def test_trailing_comment(self):
b = """x = map(f, 'abc') # foo"""
a = """x = list(map(f, 'abc')) # foo"""
Expand Down

0 comments on commit c6494a4

Please sign in to comment.