Beispiel #1
0
    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)
Beispiel #2
0
 def test_add_arguments(self):
     ann = Relation.from_string('ID\tname arg1 arg2')
     self.assertEqual(TestRelation.ARGS, ann.args)