Skip to content

Commit

Permalink
test the sorting correctly (insertion order for the test graph was no…
Browse files Browse the repository at this point in the history
…t sorted)
  • Loading branch information
ljeub-pometry committed Dec 13, 2024
1 parent 019f2b1 commit 03d03b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/tests/test_graphdb/test_graphdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ def test_edge_sorting():

@with_disk_graph
def check(g):
assert list(g.edges) == sorted(g.edges)
assert list(g.edges.explode()) == sorted(g.edges.explode())
assert sorted(g.edges, key=lambda e: e.id) == sorted(g.edges)
assert sorted(g.edges.explode(), key=lambda e: (*e.id, e.time)) == sorted(
g.edges.explode()
)

check(g)

Expand Down

0 comments on commit 03d03b0

Please sign in to comment.