Exemple #1
0
 def test_set_is_hashable(self):
     s = FrozenOrderedSet(['a', 'b', 'c'])
     hash(s)
Exemple #2
0
 def test_init_from_sequence(self):
     s = FrozenOrderedSet([5, 2, 4, 0, 9, 13, 5, 3])
     self.assertEqual(list(s), [5, 2, 4, 0, 9, 13, 3])
Exemple #3
0
 def test_set_length(self):
     s = FrozenOrderedSet([1, 2, 3])
     self.assertEqual(len(s), 3)
Exemple #4
0
 def test_init_from_empty(self):
     s = FrozenOrderedSet()
     self.assertEqual(list(s), [])