def test_equality(self): def getAttrs(ann): attrs = dict(vars(ann)) attrs['target1'] = attrs['args']['Arg1'] attrs['target2'] = attrs['args']['Arg2'] del attrs['args'] return attrs self.assertIsEqual(Relation.from_string(self.STRING), getAttrs)
def test_add_arguments(self): ann = Relation.from_string('ID\tname arg1 arg2') self.assertEqual(TestRelation.ARGS, ann.args)