def test_case(self): self.assertTrue(is_prime(7), msg='Is not prime')
def test_true(self): result = is_prime(7) self.assertTrue(result)
def test_false(self): result = is_prime(8) self.assertFalse(result)
def test_case(self): self.assertTrue(is_prime(7),msg="is not prime!")
def test_case_1(self): self.assertTrue(is_prime(7))
def test_case_2(self): self.assertFalse(is_prime(8))
def test_case(self): self.assertTrue(is_prime(6), msg='hahahaha')
def test_count(self): #self.assertTrue(is_prime(8),msg='is not a prime') #测试表达式的值是否为True,为False测试失败 self.assertFalse(is_prime(7), msg='is a prime') #测试表达式的值是否为false,为true测试失败