Skip to content

Commit 43d9f7b

Browse files
committed
Merge pull request #70 from brettcannon/remove_idempotent_redundancy
Remove explicit idempotent tests
2 parents 5e6ba63 + 7b24540 commit 43d9f7b

File tree

4 files changed

+0
-60
lines changed

4 files changed

+0
-60
lines changed

tests/test_fix_filter.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@
3535
pass
3636
""")
3737

38-
FILTER_SIX_ALREADY = ("""\
39-
from six.moves import filter
40-
filter(None, [1])
41-
""", """\
42-
from six.moves import filter
43-
filter(None, [1])
44-
""")
45-
4638

4739
def test_filter_call():
4840
check_on_input(*FILTER_CALL)
@@ -55,9 +47,3 @@ def test_filter_too_many_args():
5547

5648
def test_filter_kwargs():
5749
check_on_input(*FILTER_KWARGS)
58-
59-
def test_filter_iterator_context():
60-
check_on_input(*FILTER_ITERATOR_CONTEXT)
61-
62-
def test_filter_six_already():
63-
check_on_input(*FILTER_SIX_ALREADY)

tests/test_fix_map.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@
4949
pass
5050
""")
5151

52-
MAP_SIX_ALREADY = ("""\
53-
from six.moves import map
54-
map(x, [1])
55-
""", """\
56-
from six.moves import map
57-
map(x, [1])
58-
""")
59-
6052

6153
def test_map_2_args():
6254
check_on_input(*MAP_2_ARGS)
@@ -78,6 +70,3 @@ def test_map_ref():
7870

7971
def test_map_iterator_context():
8072
check_on_input(*MAP_ITERATOR_CONTEXT)
81-
82-
def test_map_six_already():
83-
check_on_input(*MAP_SIX_ALREADY)

tests/test_fix_xrange_six.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,20 @@
11
from utils import check_on_input
22

33

4-
# range()
54
RANGE = ("""\
65
x = range(1)
76
""", """\
87
from six.moves import range
98
x = list(range(1))
109
""")
1110

12-
RANGE_IDEMPOTENT = ("""\
13-
x = list(range(1))
14-
""", """\
15-
from six.moves import range
16-
x = list(range(1))
17-
""")
18-
19-
# xrange()
2011
XRANGE = ("""\
2112
xrange(1)
2213
""", """\
2314
from six.moves import range
2415
range(1)
2516
""")
2617

27-
XRANGE_IDEMPOTENT = ("""\
28-
from six.moves import range
29-
range(1)
30-
""", """\
31-
from six.moves import range
32-
range(1)
33-
""")
34-
35-
# Both
3618
XRANGE_RANGE = ("""\
3719
x = xrange(1)
3820
y = range(1)
@@ -46,14 +28,8 @@
4628
def test_range():
4729
check_on_input(*RANGE)
4830

49-
def test_range_idempotent():
50-
check_on_input(*RANGE_IDEMPOTENT)
51-
5231
def test_xrange():
5332
check_on_input(*XRANGE)
5433

55-
def test_xrange_idempotent():
56-
check_on_input(*XRANGE_IDEMPOTENT)
57-
5834
def test_xrange_range():
5935
check_on_input(*XRANGE_RANGE)

tests/test_fix_zip.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@
4646
pass
4747
""")
4848

49-
ZIP_SIX_ALREADY = ("""\
50-
from six.moves import zip
51-
zip(x)
52-
""", """\
53-
from six.moves import zip
54-
zip(x)
55-
""")
56-
5749

5850
def test_zip_call_no_args():
5951
check_on_input(*ZIP_CALL_NO_ARGS)
@@ -72,6 +64,3 @@ def test_zip_kwargs():
7264

7365
def test_zip_iterator_context():
7466
check_on_input(*ZIP_ITERATOR_CONTEXT)
75-
76-
def test_zip_six_already():
77-
check_on_input(*ZIP_SIX_ALREADY)

0 commit comments

Comments
 (0)