Пример #1
0
def test_reset(doltdb):
    db = Dolt(doltdb)
    db.reset()
    db.reset(hard=True)
    db.reset(soft=True)
    db.reset(tables="t1")
    db.reset(tables=["t1"])
Пример #2
0
def test_reset_errors(doltdb):
    db = Dolt(doltdb)
    with pytest.raises(ValueError):
        db.reset(hard=True, soft=True)
    with pytest.raises(ValueError):
        db.reset(tables="t1", hard=True)
    with pytest.raises(ValueError):
        db.reset(tables="t1", soft=True)
    with pytest.raises(ValueError):
        db.reset(tables={"t1": True})