From c6494a4da1f6cd6505ee6b5a59333e2ed3a6da2c Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Mon, 18 May 2020 10:58:26 +0100 Subject: [PATCH] add test for index in iteration context Refs #12 --- fissix/tests/test_fixers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fissix/tests/test_fixers.py b/fissix/tests/test_fixers.py index 348f385..b38fd8e 100644 --- a/fissix/tests/test_fixers.py +++ b/fissix/tests/test_fixers.py @@ -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"""