mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
The filter() function does support a None argument in Py3.0.
This commit is contained in:
parent
05387861ea
commit
10dca6e282
3 changed files with 0 additions and 27 deletions
|
@ -48,17 +48,6 @@ class TestPy3KWarnings(unittest.TestCase):
|
|||
with catch_warning() as w:
|
||||
self.assertWarning(cell0 < cell1, w, expected)
|
||||
|
||||
def test_filter(self):
|
||||
from itertools import ifilter
|
||||
from future_builtins import filter
|
||||
expected = 'ifilter with None as a first argument is not supported '\
|
||||
'in 3.x. Use a list comprehension instead.'
|
||||
|
||||
with catch_warning() as w:
|
||||
self.assertWarning(ifilter(None, []), w, expected)
|
||||
with catch_warning() as w:
|
||||
self.assertWarning(filter(None, []), w, expected)
|
||||
|
||||
def test_code_inequality_comparisons(self):
|
||||
expected = 'code inequality comparisons not supported in 3.x.'
|
||||
def f(x):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue