Skip to content

Commit e4bb1d5

Browse files
jgreweachilleas-k
authored andcommitted
[fileio] use to-string in display method
1 parent 58c3cf2 commit e4bb1d5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

odml/fileio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ def save(obj, filename, backend="xml"):
1414

1515

1616
def display(obj, backend="xml"):
17-
# needs to be handled through the generic ODMLWriter
18-
pass
17+
writer = ODMLWriter(backend)
18+
print(writer.to_string(obj))

test/test_fileio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ def test_invalid_parser(self):
3636
with self.assertRaises(NotImplementedError):
3737
odml.save(doc, self.file + '_copy_html', 'html')
3838

39-
# odml.display not implemented
40-
# with self.assertRaises(NotImplementedError):
41-
# odml.display(doc, 'html')
39+
with self.assertRaises(NotImplementedError):
40+
odml.display(doc, 'html')
41+

0 commit comments

Comments
 (0)