コード例 #1
0
ファイル: test_brat.py プロジェクト: fnl/otplc
    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)
コード例 #2
0
ファイル: test_brat.py プロジェクト: fnl/otplc
 def test_add_arguments(self):
     ann = Relation.from_string('ID\tname arg1 arg2')
     self.assertEqual(TestRelation.ARGS, ann.args)