summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_collections.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r--Lib/test/test_collections.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index b3e0907..b2cad70 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -812,6 +812,15 @@ class TestCounter(unittest.TestCase):
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'