def test_write_annotation(self): """ The write_annotation method produces the correct string. """ writer = KiCAD() buf = StringIO() ann = Annotation('test', 1, 2, .5, 'true') writer.write_annotation(buf, ann) self.assertEqual(buf.getvalue(), 'Text Label 11 -22 900 60 ~ 0\ntest\n')