diff options
author | David Wolever <david@wolever.net> | 2008-03-19 02:35:45 +0000 |
---|---|---|
committer | David Wolever <david@wolever.net> | 2008-03-19 02:35:45 +0000 |
commit | 2724ab99c8c81cdb032372871d8f1eebb171ebe7 (patch) | |
tree | 536d452a552c67fc395e7049db451df5ee296eaa /Lib/test/test_py3kwarn.py | |
parent | fbe7c559054e33a74a330462aa8ae0682910a414 (diff) | |
download | cpython-git-2724ab99c8c81cdb032372871d8f1eebb171ebe7.tar.gz |
Added zip, map, filter to future_bultins (#2171)
Diffstat (limited to 'Lib/test/test_py3kwarn.py')
-rw-r--r-- | Lib/test/test_py3kwarn.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py index cdb1038449..cc1e9f4d50 100644 --- a/Lib/test/test_py3kwarn.py +++ b/Lib/test/test_py3kwarn.py @@ -50,6 +50,17 @@ 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): |