Пример #1
0
def test_add():
    bset = BabyIntegerSet([1, 3, 5, 3])
    bset.add(3)
    assert len(bset.dump_data()) == 3
Пример #2
0
def test_add_exception():
    bset = BabyIntegerSet()
    with pytest.raises(UnsupportedTypeError) as exeinfo:
        bset.add('9')
    assert 'not a valid integer' in str(exeinfo)