Fix minor subclassing issue with collections.Counter
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 8989ac3..3d6ad09 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -680,6 +680,15 @@
self.assertEqual(len(dup), len(words))
self.assertEqual(type(dup), type(words))
+ def test_copy_subclass(self):
+ class MyCounter(Counter):
+ pass
+ c = MyCounter('slartibartfast')
+ d = c.copy()
+ self.assertEqual(d, c)
+ self.assertEqual(len(d), len(c))
+ self.assertEqual(type(d), type(c))
+
def test_conversions(self):
# Convert to: set, list, dict
s = 'she sells sea shells by the sea shore'