Example #1
0
 def test_num_docs(self):
     self.assertEqual(len(convert_to_list("qa/dataset/Answers.txt")), 2609)
Example #2
0
 def test_number_topics(self):
     list = convert_to_list("qa/dataset/Topics.txt")
     self.assertEqual(len(set(list)), 130)
Example #3
0
 def test_count_amazon(self):
     list = convert_to_list("qa/dataset/Answers.txt")
     subcount = [sub for sub in list if "Amazon" in sub]
     self.assertEqual(len(subcount), 18)
Example #4
0
 def test_longest_answer(self):
     list = convert_to_list("qa/dataset/Answers.txt")
     self.assertEqual(len(max(list, key=len)), 1456)
Example #5
0
 def test_first_answer(self):
     list = convert_to_list("qa/dataset/Answers.txt")
     self.assertTrue(list.index("Ten")==0)