def test_truncate(): K = KVFS(dict()) K.create("/blub") K.write("/blub", "hello world") K.truncate("/blub", 5) data = K.read("/blub", 10) assert data == "hello"
def test_noexists_truncate(): K = KVFS(dict()) K.truncate("/blub", 5)