def test_addSeq(): bset = BabyIntegerSet([1, 3, 5, 3]) bset.addSeq([1, 3, 5, 7]) assert len(bset.dump_data()) == 4
def test_init(): bset = BabyIntegerSet() assert len(bset.dump_data()) == 0
def test_init_empty(): bset = BabyIntegerSet([1, 3, 5, 3]) assert len(bset.dump_data()) == 3
def test_remove_all_odds(): bset = BabyIntegerSet([1, 3, 5, 3]) bset.remove_all_odds() assert len(bset.dump_data()) == 0
def test_sortme(): bset = BabyIntegerSet([5, 7, 1, 3]) bset.sortme() assert (bset.dump_data()) == [1, 3, 5, 7]
def test_size(): bset = BabyIntegerSet([1, 3, 5, 2]) bset.size() assert len(bset.dump_data()) == 4
def test_clear(): bset = BabyIntegerSet([1, 4, 7]) bset.clear() assert len(bset.dump_data()) == 0