(sess, student_v, teacher_v, student_group_e)
| 94 | |
| 95 | |
| 96 | def 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 | |
| 126 | def test_graph_to_numpy(sess): |
nothing calls this directly
no test coverage detected