def testReadWrite(odbhs: OrientDbHashStore, nodesLeaves): nodes, leaves = nodesLeaves for node in nodes: odbhs.writeNode(node) for leaf in leaves: odbhs.writeLeaf(leaf) onebyone = [odbhs.readLeaf(i + 1) for i in range(10)] multiple = odbhs.readLeafs(1, 10) assert onebyone == multiple
def testIndexFrom1(odbhs: OrientDbHashStore): with pytest.raises(IndexError): odbhs.readLeaf(0)