diff options
author | Raymond Hettinger <python@rcn.com> | 2009-02-19 02:17:09 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-02-19 02:17:09 (GMT) |
commit | 15a4950da1a80b334ee4985c62e66a1e1071a951 (patch) | |
tree | f4038ec0edc4fa562dd334b4a9b1b244dc24dd21 /Lib/test/test_itertools.py | |
parent | bc670849405d9bda3bbf6f1d28a252abe778bdd9 (diff) | |
download | cpython-15a4950da1a80b334ee4985c62e66a1e1071a951.zip cpython-15a4950da1a80b334ee4985c62e66a1e1071a951.tar.gz cpython-15a4950da1a80b334ee4985c62e66a1e1071a951.tar.bz2 |
Add keyword arg support to itertools.compress().
Diffstat (limited to 'Lib/test/test_itertools.py')
-rw-r--r-- | Lib/test/test_itertools.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index c34b915..94159b5 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -310,6 +310,7 @@ class TestBasicOps(unittest.TestCase): self.assertEqual(comb, sorted(set(cwr) & set(perm))) # comb: both a cwr and a perm def test_compress(self): + self.assertEqual(list(compress(data='ABCDEF', selectors=[1,0,1,0,1,1])), list('ACEF')) self.assertEqual(list(compress('ABCDEF', [1,0,1,0,1,1])), list('ACEF')) self.assertEqual(list(compress('ABCDEF', [0,0,0,0,0,0])), list('')) self.assertEqual(list(compress('ABCDEF', [1,1,1,1,1,1])), list('ABCDEF')) |