Exemple #1
0
 def test_IOError(self):
     ans = _(
         "You should have raised an error and returned the name of the error but it returned: {}."
     )
     stu_ans = houseCup.winning_house('IOError.txt')
     self.assertEqual(equal_string('IOError'), equal_string(stu_ans),
                      ans.format(stu_ans))
Exemple #2
0
 def test_winners(self):
     generate_intel('data.txt', True)
     ans = _("For the given students' achievements {} you decided {} won but {} clearly did.")
     stu_ans = houseCup.winning_house('data.txt')
     corr_ans = corr.winning_house('data.txt')
     with open('data.txt', 'r') as f:
         score = f.readlines()
     self.assertEqual(corr_ans, stu_ans, ans.format(score, stu_ans, corr_ans))