summaryrefslogtreecommitdiff
path: root/Lib/test/test_future_builtins.py
diff options
context:
space:
mode:
authorDavid Wolever <david@wolever.net>2008-03-19 02:35:45 +0000
committerDavid Wolever <david@wolever.net>2008-03-19 02:35:45 +0000
commit2724ab99c8c81cdb032372871d8f1eebb171ebe7 (patch)
tree536d452a552c67fc395e7049db451df5ee296eaa /Lib/test/test_future_builtins.py
parentfbe7c559054e33a74a330462aa8ae0682910a414 (diff)
downloadcpython-git-2724ab99c8c81cdb032372871d8f1eebb171ebe7.tar.gz
Added zip, map, filter to future_bultins (#2171)
Diffstat (limited to 'Lib/test/test_future_builtins.py')
-rw-r--r--Lib/test/test_future_builtins.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/test/test_future_builtins.py b/Lib/test/test_future_builtins.py
index 69e719bc3b..0e16caf5d0 100644
--- a/Lib/test/test_future_builtins.py
+++ b/Lib/test/test_future_builtins.py
@@ -1,7 +1,8 @@
import test.test_support, unittest
# we're testing the behavior of these future builtins:
-from future_builtins import hex, oct
+from future_builtins import hex, oct, map, zip, filter
+from test import test_support
class BuiltinTest(unittest.TestCase):
def test_hex(self):
@@ -20,6 +21,17 @@ class BuiltinTest(unittest.TestCase):
self.assertEqual(oct(-100L), '-0o144')
self.assertRaises(TypeError, oct, ())
+ def test_itertools(self):
+ from itertools import imap, izip, ifilter
+ # We will assume that the itertools functions work, so provided
+ # that we've got identical coppies, we will work!
+ self.assertEqual(map, imap)
+ self.assertEqual(zip, izip)
+ self.assertEqual(filter, ifilter)
+ # Testing that filter(None, stuff) raises a warning lives in
+ # test_py3kwarn.py
+
+
def test_main(verbose=None):
test.test_support.run_unittest(BuiltinTest)