From a5ce14c8bbd55f4a078ceea9384cda56bf42a18b Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Sun, 18 Dec 2022 14:16:06 +0100 Subject: SparqlStore.exists bugfix --- test/triple_store/test_sparql.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/triple_store/test_sparql.py b/test/triple_store/test_sparql.py index c4925c4..8d98749 100644 --- a/test/triple_store/test_sparql.py +++ b/test/triple_store/test_sparql.py @@ -476,23 +476,23 @@ class TestSparqlStore(unittest.TestCase): store.create(tag_type, tag_ids) # exists returns all existing nodes of the correct type - self.assertSetEqual(ent_ids, store.exists(ent_type, ent_ids)) - self.assertSetEqual(tag_ids, store.exists(tag_type, tag_ids)) + self.assertSetEqual(ent_ids, set(store.exists(ent_type, ent_ids))) + self.assertSetEqual(tag_ids, set(store.exists(tag_type, tag_ids))) # exists returns only nodes that match the type - self.assertSetEqual(set(), store.exists(ent_type, tag_ids)) - self.assertSetEqual({URI('http://example.com/me/entity#1234')}, store.exists(ent_type, { + self.assertSetEqual(set(), set(store.exists(ent_type, tag_ids))) + self.assertSetEqual({URI('http://example.com/me/entity#1234')}, set(store.exists(ent_type, { URI('http://example.com/me/tag#1234'), URI('http://example.com/me/entity#1234'), - })) + }))) # exists returns only nodes that exist - self.assertSetEqual(set(), store.exists(ent_type, { + self.assertSetEqual(set(), set(store.exists(ent_type, { URI('http://example.com/me/entity#foo'), URI('http://example.com/me/entity#bar'), - })) - self.assertSetEqual({URI('http://example.com/me/entity#1234')}, store.exists(ent_type, { + }))) + self.assertSetEqual({URI('http://example.com/me/entity#1234')}, set(store.exists(ent_type, { URI('http://example.com/me/entity#foo'), URI('http://example.com/me/entity#1234'), - })) + }))) def test_create(self): -- cgit v1.2.3