summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_datastructures.py
diff options
context:
space:
mode:
authordarkryder <sambhav13085@iiitd.ac.in>2015-07-09 23:30:36 +0530
committerTim Graham <timograham@gmail.com>2015-07-09 21:20:52 -0400
commitf675afa13ce89ea25a9798b2f7a57b091bb83dfa (patch)
tree808eb3e261cf5abd798d2b07cf11aef0595ad2cb /tests/utils_tests/test_datastructures.py
parent11e6bf9bdfaecd5325686599af5b21b5b945e61c (diff)
downloaddjango-f675afa13ce89ea25a9798b2f7a57b091bb83dfa.tar.gz
Fixed #25093 -- Added utils.datastructures.OrderedSet.__len__()
Diffstat (limited to 'tests/utils_tests/test_datastructures.py')
-rw-r--r--tests/utils_tests/test_datastructures.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/utils_tests/test_datastructures.py b/tests/utils_tests/test_datastructures.py
index c0ed3435eb..99f7a1d05f 100644
--- a/tests/utils_tests/test_datastructures.py
+++ b/tests/utils_tests/test_datastructures.py
@@ -21,6 +21,14 @@ class OrderedSetTests(SimpleTestCase):
s.add(1)
self.assertTrue(s)
+ def test_len(self):
+ s = OrderedSet()
+ self.assertEqual(len(s), 0)
+ s.add(1)
+ s.add(2)
+ s.add(2)
+ self.assertEqual(len(s), 2)
+
class MultiValueDictTests(SimpleTestCase):