@@ -198,6 +198,31 @@ def test_should_convert_data_frame_to_graph_uriref(self):
198198
199199 self .assertEquals (rdflib .compare .isomorphic (g_expected , g_result ), True )
200200
201+ def test_should_convert_data_frame_to_graph_uriref_curie (self ):
202+ """Should create triples based on several compliant CURIES.
203+ """
204+
205+ ds1 = pd .Series (data = ['prefix:suffix' ], index = ['http://github.com/cadmiumkitty/rdfpandas/one' ], dtype = np .unicode_ )
206+ ds2 = pd .Series (data = ['preffix-._1.:suffix-._1' ], index = ['http://github.com/cadmiumkitty/rdfpandas/one' ], dtype = np .unicode_ )
207+
208+ df = pd .DataFrame ({
209+ 'http://github.com/cadmiumkitty/rdfpandas/curie1{URIRef}' : ds1 ,
210+ 'http://github.com/cadmiumkitty/rdfpandas/curie2{URIRef}' : ds2 ,
211+ })
212+
213+ g_expected = Graph ()
214+
215+ g_expected .add ((URIRef ('http://github.com/cadmiumkitty/rdfpandas/one' ),
216+ URIRef ('http://github.com/cadmiumkitty/rdfpandas/curie1' ),
217+ URIRef ('prefix:suffix' )))
218+ g_expected .add ((URIRef ('http://github.com/cadmiumkitty/rdfpandas/one' ),
219+ URIRef ('http://github.com/cadmiumkitty/rdfpandas/curie2' ),
220+ URIRef ('preffix-._1.:suffix-._1' )))
221+
222+ g_result = rdfpandas .to_graph (df )
223+
224+ self .assertEquals (rdflib .compare .isomorphic (g_expected , g_result ), True )
225+
201226 def test_should_convert_data_frame_to_graph_bnode (self ):
202227 """Should create triples based on BNode instance type.
203228 """
0 commit comments