def test_one_case(self): result = simple.check_simple(10) self.assertFalse(result)
def test_different_cases(self, num, expected): """Test {} is a simple number {}""" result = simple.check_simple(num) self.assertEqual(result, expected)
def test_bad_nums(self): # result = simple.check_simple(-5) # self.assertFalse(result) with self.assertRaises(TypeError): simple.check_simple(-5)
def test_false_cases(self, num): """Test {} is not a simple number""" result = simple.check_simple(num) self.assertFalse(result)