Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
OWL2YAMS
Commits
2968990436f7
Commit
29689904
authored
Oct 26, 2021
by
Fabien Amarger
Browse files
feat(test): Add test relation without domain and range
parent
23c33bce6c89
Pipeline
#90296
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/data/test_relation_without_domain_range.owl
0 → 100644
View file @
29689904
@prefix : <http://loutre.fr/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
:FirstClass a owl:Class.
:SecondClass a owl:Class.
:rel1 a owl:ObjectProperty.
test/data/test_relation_without_domain_range.yams
0 → 100644
View file @
29689904
from yams.buildobjs import *
class SecondClass(EntityType):
pass
class FirstClass(EntityType):
pass
class rel1(RelationDefinition):
subject = ('FirstClass', 'SecondClass',)
object = ('FirstClass', 'SecondClass',)
test/test_owl2yams.py
View file @
29689904
...
...
@@ -43,6 +43,12 @@
def
test_transform_hierarchy
(
self
):
self
.
_load_owl_and_yams
(
"test_hierarchy.owl"
,
"test_hierarchy.yams"
)
def
test_transform_relation_without_domain_range
(
self
):
self
.
_load_owl_and_yams
(
"test_relation_without_domain_range.owl"
,
"test_relation_without_domain_range.yams"
,
)
def
test_raise_multi_class
(
self
):
with
self
.
assertRaises
(
ValueError
):
self
.
_load_owl_and_yams
(
"test_multi_class.owl"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment