MCPcopy Create free account
hub / github.com/alibaba/GraphScope / test_unload_graph

Function test_unload_graph

python/graphscope/tests/unittest/test_lazy.py:96–123  ·  view source on GitHub ↗
(sess, student_v, teacher_v, student_group_e)

Source from the content-addressed store, hash-verified

94
95
96def test_unload_graph(sess, student_v, teacher_v, student_group_e):
97 # case 1
98 # 1. load empty g
99 # 2. unload g
100 g = sess.g()
101 g = sess.run(g)
102 del g
103
104 # case 2
105 g = sess.g()
106 g1 = g.add_vertices(student_v, "student")
107 g2 = g.add_vertices(teacher_v, "teacher")
108 del g1, g2
109
110 # case 3
111 g = sess.g()
112 g1 = g.add_vertices(student_v, "student")
113 g2 = g1.add_vertices(teacher_v, "teacher")
114 g3 = g2.add_edges(
115 student_group_e, "group", src_label="student", dst_label="student"
116 )
117
118 del g, g1, g2, g3
119
120 # case 4
121 # test unload twice
122 g = sess.g()
123 del g
124
125
126def test_graph_to_numpy(sess):

Callers

nothing calls this directly

Calls 4

gMethod · 0.45
runMethod · 0.45
add_verticesMethod · 0.45
add_edgesMethod · 0.45

Tested by

no test coverage detected