Skip to content

Commit

Permalink
Add slots tests for Vertex and Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
realshouzy committed Apr 28, 2024
1 parent f75af4f commit dec0729
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/datastructures/edge_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
from nrw.datastructures._vertex import Vertex


def test_slots_of_edge() -> None:
assert Edge.__slots__ == ("_vertices", "_weight", "_mark")


def test_edge_is_unhashable() -> None:
assert Edge.__hash__ is None

Expand Down
4 changes: 4 additions & 0 deletions tests/datastructures/vertex_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
from nrw.datastructures._vertex import Vertex


def test_slots_of_vertex() -> None:
assert Vertex.__slots__ == ("_id", "_mark")


def test_vertex_is_unhashable() -> None:
assert Vertex.__hash__ is None

Expand Down

0 comments on commit dec0729

Please sign in to comment.