예제 #1
0
 def test_set_is_hashable(self):
     s = FrozenOrderedSet(['a', 'b', 'c'])
     hash(s)
예제 #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])
예제 #3
0
 def test_set_length(self):
     s = FrozenOrderedSet([1, 2, 3])
     self.assertEqual(len(s), 3)
예제 #4
0
 def test_init_from_empty(self):
     s = FrozenOrderedSet()
     self.assertEqual(list(s), [])