def test_to_str(self):
        dict_str = self.dict_to_str(self.annotations)
        for node in self.traj.f_iter_nodes(recursive=True):
            ann_str = node.f_ann_to_str()

            self.assertTrue(not ann_str.endswith(' ') or not ann_str.endswith(','))

            for name in self.annotations:
                if name==0:
                    name = 'annotation'
                self.assertTrue(name in ann_str)

            self.assertEqual(dict_str, ann_str, '%s!=%s' % (dict_str, ann_str))

            ann_str = str(node.v_annotations)
            self.assertEqual(dict_str, ann_str, '%s!=%s' % (dict_str, ann_str))
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/tests/unittests/annotations_test.py/AnnotationsTest.test_to_str/original