def test_copy(self): r = btree_mini.BTreeSet({i for i in range(10)}) r_copy = r.copy() for a, b in zip(r, r_copy): self.assertEqual(a, b)
def test_reversed(self): r = btree_mini.BTreeSet({i for i in range(10)}) for a, b in zip(reversed(r), reversed(range(10))): self.assertEqual(a, b)
def test_create_list(self): data = [(i, -i) for i in range(10)] r = btree_mini.BTreeSet(data) self.assertEqual(data, list(r))
def test_clear(self): r = btree_mini.BTreeSet({i for i in range(10)}) r.clear() self.assertEqual(0, len(list(r)))
def test_create_set(self): data = {i for i in range(10)} r = btree_mini.BTreeSet(data) self.assertEqual(list(data), list(r))