Example #1
0
    seinfeld = StringIO("""
[Typedef]
id: parent

[Typedef]
id: child
inverse_of: parent ! not actually used yet

[Term]
id: 001
name: George

[Term]
id: 002
name: Estelle
relationship: parent 001 ! George

[Term]
id: 003
name: Frank
relationship: parent 001 ! George

""")  # TODO: fill the ontology with all characters
    term = OBOObject.parse_stanza(stanza)

    seinfeld = OBOOntology(seinfeld)
    print seinfeld.child_edges("001")

    doctest.testmod(extraglobs={"stanza": stanza, "term": term},
                    optionflags=doctest.ELLIPSIS)