diff options
author | Raymond Hettinger <python@rcn.com> | 2009-01-21 23:12:51 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-01-21 23:12:51 +0000 |
commit | 0a1f7b8f725ddfc50016c0c49309973445e1e233 (patch) | |
tree | e12cf5668ac639852d8f6a159df5e2c1ffd0b169 /Lib/test | |
parent | 4571f347f94a969a21a94d29b40a18a7b4dcd21f (diff) | |
download | cpython-git-0a1f7b8f725ddfc50016c0c49309973445e1e233.tar.gz |
Tighten-up the docs for Counter().
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_collections.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 47b093e9dd..274f531635 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -448,6 +448,11 @@ class TestCounter(unittest.TestCase): self.assertEqual(dict(Counter(s)), dict(Counter(s).items())) self.assertEqual(set(Counter(s)), set(s)) + def test_invariant_for_the_in_operator(self): + c = Counter(a=10, b=-2, c=0) + for elem in c: + self.assert_(elem in c) + def test_multiset_operations(self): # Verify that adding a zero counter will strip zeros and negatives c = Counter(a=10, b=-2, c=0) + Counter() |