Skip to content

Commit 1058d97

Browse files
committed
chore: add test for is_exist function
1 parent 360ab04 commit 1058d97

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_graph.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,20 @@ def test_invalid_url(self):
219219
with pytest.raises(ValueError):
220220
KG("http://foo")
221221

222+
def test_is_exist(self, setup):
223+
assert LOCAL_KG.is_exist([f"{URL}#Alice", "foo"]) is False
224+
assert (
225+
LOCAL_KG.is_exist(
226+
[
227+
f"{URL}#Alice",
228+
f"{URL}#Bob",
229+
f"{URL}#Casper",
230+
f"{URL}#Dean",
231+
]
232+
)
233+
is True
234+
)
235+
222236
def test_remove_edge(self, setup):
223237
vtx_alice = Vertex(f"{URL}#Alice")
224238

0 commit comments

Comments
 (0)