Skip to content

Commit

Permalink
test(py-rdfquery): add predicate_path_single test
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleycaselli committed Jan 25, 2024
1 parent 823baab commit bf8241e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/resources/py/tests-rdfquery/paths.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def predicate_path_single():
return rdf_query(_data).path("sh:Shape", "rdfs:label", "?label").get_node("?label")
30 changes: 30 additions & 0 deletions src/test/resources/py/tests-rdfquery/paths.test.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# baseURI: http://datashapes.org/py/tests-rdfquery/paths.test
# imports: http://datashapes.org/dash
# prefix: ex

@prefix dash: <http://datashapes.org/dash#> .
@prefix ex: <http://datashapes.org/py/tests-rdfquery/paths.test#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://datashapes.org/py/tests-rdfquery/paths.test>
rdf:type owl:Ontology ;
rdfs:label "Test of paths" ;
owl:imports <http://datashapes.org/dash> ;
owl:versionInfo "Created with TopBraid Composer" ;
.
<http://datashapes.org/py/tests-rdfquery/paths.test#paths.py>
rdf:type sh:PyLibrary ;
sh:pyLibrary dash:RDFQueryPyLibrary ;
sh:pyLibraryURL "http://datashapes.org/py/tests-rdfquery/paths.py"^^xsd:anyURI ;
.
ex:predicatePathSingle
rdf:type dash:PyTestCase ;
dash:expectedResult "Shape"@en ;
rdfs:label "predicate path single" ;
sh:pyFunctionName "predicate_path_single" ;
sh:pyLibrary <http://datashapes.org/py/tests-rdfquery/paths.test#paths.py> ;
.

0 comments on commit bf8241e

Please sign in to comment.