def test_generate_question_multiplication(self): g = Mg(type_='x', max_number=9, question_count=10) question = g.generate_question() self.assertEqual(question[0] * question[2], question[3])
def test_generate_question_subtraction(self): g = Mg(type_='-', max_number=9, question_count=10) question = g.generate_question() self.assertEqual(question[0] - question[2], question[3]) # answer should be greater than 0 self.assertGreaterEqual(question[3], 0)