Merge
authorRaymond Hettinger <python@rcn.com>
Sat, 5 Nov 2011 20:39:57 +0000 (13:39 -0700)
committerRaymond Hettinger <python@rcn.com>
Sat, 5 Nov 2011 20:39:57 +0000 (13:39 -0700)
1  2 
Lib/collections/__init__.py
Lib/test/test_collections.py

Simple merge
index ec2093891791b238c706719a59bfa66eb45e1d70,8dc5559cae3aebef445fce6a7e1a930b0df02ae5..c9b7f6b6bf73fab00844865b1c8ce0cbb0668619
@@@ -964,11 -893,12 +964,17 @@@ class TestCounter(unittest.TestCase)
          c.subtract('aaaabbcce')
          self.assertEqual(c, Counter(a=-1, b=0, c=-1, d=1, e=-1))
  
 -
 +    def test_unary(self):
 +        c = Counter(a=-5, b=0, c=5, d=10, e=15,g=40)
 +        self.assertEqual(dict(+c), dict(c=5, d=10, e=15, g=40))
 +        self.assertEqual(dict(-c), dict(a=5))
 +
+     def test_repr_nonsortable(self):
+         c = Counter(a=2, b=None)
+         r = repr(c)
+         self.assertIn("'a': 2", r)
+         self.assertIn("'b': None", r)
++    
      def test_helper_function(self):
          # two paths, one for real dicts and one for other mappings
          elems = list('abracadabra')