Skip to content

Commit d4581b4

Browse files
Prerak SinghPrerak Singh
authored andcommitted
tests added
1 parent de01034 commit d4581b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pydatastructs/utils/tests/test_misc_util.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,16 @@ def test_AdjacencyListGraphNode():
3636
h.add_adjacent_node('h_1', 4)
3737
assert h.adjacent['h_1'] == 4
3838
assert str(h) == "('h', 0)"
39+
h_5 = AdjacencyListGraphNode('h_5', h_1, backend = Backend.CPP)
40+
assert h_5.data == h_1
3941

4042
def test_AdjacencyMatrixGraphNode():
4143
g = AdjacencyMatrixGraphNode("1", 3)
4244
g2 = AdjacencyMatrixGraphNode("1", 3, backend = Backend.CPP)
4345
assert str(g) == "('1', 3)"
4446
assert str(g2) == "('1', 3)"
47+
g3 = AdjacencyListGraphNode("3", g2, backend = Backend.CPP)
48+
assert g3.data == g2
4549

4650

4751
def test_GraphEdge():

0 commit comments

Comments
 (0)