From 14234aebf7fc23e649c0f4a0c2ebf51f3a068386 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Wed, 20 Nov 2024 14:44:59 +0100 Subject: [PATCH] Update test_struct.py --- tests/test_struct.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/tests/test_struct.py b/tests/test_struct.py index 70a7cfaa..60a347c0 100644 --- a/tests/test_struct.py +++ b/tests/test_struct.py @@ -76,7 +76,9 @@ def assert_lines(self, text: str, lines: Iterable[str]) -> None: def test_term(self): """Test emitting properties.""" term = Term( - reference=Reference(prefix="GO", identifier="0050069", name="lysine dehydrogenase activity"), + reference=Reference( + prefix="GO", identifier="0050069", name="lysine dehydrogenase activity" + ), ) self.assert_lines( """\ @@ -84,14 +86,16 @@ def test_term(self): id: GO:0050069 name: lysine dehydrogenase activity """, - term.iterate_obo_lines(ontology="GO", typedefs={}) + term.iterate_obo_lines(ontology="GO", typedefs={}), ) term = Term( - reference=Reference(prefix="GO", identifier="0050069", name="lysine dehydrogenase activity"), + reference=Reference( + prefix="GO", identifier="0050069", name="lysine dehydrogenase activity" + ), properties={ "key": ["value"], - } + }, ) self.assert_lines( """\ @@ -100,17 +104,17 @@ def test_term(self): name: lysine dehydrogenase activity property_value: key "value" xsd:string """, - term.iterate_obo_lines(ontology="GO", typedefs={}) + term.iterate_obo_lines(ontology="GO", typedefs={}), ) - typedef = TypeDef( - reference=Reference.from_curie("RO:1234567") - ) + typedef = TypeDef(reference=Reference.from_curie("RO:1234567")) term = Term( - reference=Reference(prefix="GO", identifier="0050069", name="lysine dehydrogenase activity"), + reference=Reference( + prefix="GO", identifier="0050069", name="lysine dehydrogenase activity" + ), relationships={ typedef: [Reference.from_curie("EC:1.1.1.1")], - } + }, ) self.assert_lines( """\ @@ -119,5 +123,5 @@ def test_term(self): name: lysine dehydrogenase activity relationship: RO:1234567 eccode:1.1.1.1 """, - term.iterate_obo_lines(ontology="GO", typedefs={typedef.pair: typedef}) + term.iterate_obo_lines(ontology="GO", typedefs={typedef.pair: typedef}), )