Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maximelucas committed Oct 16, 2023
1 parent ee380a9 commit c3e6c1d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/drawing/test_draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,16 @@ def test_draw_simplices(edgelist8):
S = xgi.SimplicialComplex(edgelist8)

fig, ax = plt.subplots()
ax = xgi.draw_simplices(S, ax=ax)
ax, collections = xgi.draw_simplices(S, ax=ax)
(dyad_collection, edge_collection) = collections

# number of elements
assert len(ax.lines) == 18 # dyads
assert len(ax.patches) == 3 # hyperedges
assert len(ax.collections) == 0 # nodes
assert len(ax.lines) == 0
assert len(ax.patches) == 0
assert len(ax.collections) == 2

assert len(dyad_collection.get_paths()) == 16 # dyads
assert len(edge_collection.get_paths()) == 3 # other hyperedges

# zorder
for line in ax.lines: # dyads
Expand Down

0 comments on commit c3e6c1d

Please sign in to comment.