def test_query_load(self): ''' Query.load ''' query = Query.load(('1', '2',)) self.assertEqual(query.qid, '1') self.assertRaises(Exception, Query.load, ('1',))
def test_query_read(self): ''' Query.read ''' queries = Query.read('./data/MC2-training/en/1C2-E-queries.tsv') self.assertEqual(queries[0].qid, '1C2-E-0001') self.assertEqual(queries[0].body, 'michael jackson death') self.assertEqual(len(queries), 100)