Moved map() and filter() for PY2 test into Typeshed test data

This commit is contained in:
Andrey Vlasovskikh
2017-02-22 23:07:45 +03:00
parent 9eeca0dcdc
commit 4561987ee5
3 changed files with 8 additions and 9 deletions
@@ -1,5 +0,0 @@
def test():
print(map(str, [1, 2, 3]) + ['foo']) #pass
print(map(lambda x: x.upper(), 'foo')) #pass
print(filter(lambda x: x % 2 == 0, [1, 2, 3]) + [4, 5, 6]) #pass
print(filter(lambda x: x != 'f', 'foo') + 'bar') #pass
@@ -0,0 +1,8 @@
def test_map():
assert map(str, [1, 2, 3]) + ['foo'] == ['1', '2', '3', 'foo']
assert map(lambda x: x.upper(), 'foo').pop() == 'O'
def test_filter():
assert filter(lambda x: x % 2 == 0, [1, 2, 3]) + [4, 5, 6] == [2, 4, 5, 6]
assert filter(lambda x: x != 'f', 'foo') + 'bar' == 'oobar'
@@ -103,10 +103,6 @@ public class PyTypeCheckerInspectionTest extends PyTestCase {
doTest();
}
public void testBuiltinFunctions() {
doTest();
}
public void testUnionReturnTypes() {
doTest();
}