Commit 74ddd091 authored by Fabien Amarger's avatar Fabien Amarger
Browse files

feat(test): Add test class

parent 4a98155b6c34
from yams.buildobjs import *
class FirstClass(EntityType):
toto = Int()
name = String()
class SubClass(FirstClass):
name = String()
class rel1(RelationDefinition):
subject = ('SubClass',)
object = ('FirstClass',)
class rel2(RelationDefinition):
subject = ('FirstClass', 'SubClass',)
object = ('FirstClass', 'SubClass',)
class rel3(RelationDefinition):
subject = ('FirstClass', 'SubClass',)
object = ('SubClass', 'FirstClass',)
@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.
:SubClass a owl:Class;
rdfs:subClassOf :FirstClass.
:toto a owl:DatatypeProperty;
rdfs:domain :FirstClass;
rdfs:range xsd:int.
:rel1 a owl:ObjectProperty;
rdfs:domain :SubClass;
rdfs:range :FirstClass.
:rel2 a owl:ObjectProperty.
:name a owl:DatatypeProperty;
rdfs:domain owl:Thing.
:rel3 a owl:ObjectProperty;
rdfs:range :SubClass, :FirstClass.
@prefix : <http://loutre.fr/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
:FirstClass a owl:Class.
from yams.buildobjs import *
class FirstClass(EntityType):
pass
......@@ -25,8 +25,8 @@
self.assertEquals(serialize_to_python(schema), expected_yams_schema)
return schema
def test_transform_owl_to_yams(self):
self._load_owl_and_yams("model.owl", "expected_schema.yams")
def test_transform_class(self):
self._load_owl_and_yams("test_class.owl", "test_class.yams")
if __name__ == "__main__":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment