def test_output(self): results = prime_numbers(3) self.assertTrue(results , "The output cannot be an empty list")
def test_negative_numbers(self): self.assertEqual(prime_numbers(-1) , "You cannot enter negative numbers")
def test_prime_numbers_10(self): self.assertEqual(prime_numbers(10), [2,3,5,7] )
def test_prime_numbers(self): self.assertEqual(prime_numbers(5) , [2 , 3 ,5])
def test_prime_numbers_list(self): self.assertIs(type(prime_numbers(10), list ) )
def test_prime_numbers_len(self): self.assertTrue(len(prime_numbers(10)<10 ) if __name__ == '__main__ ': unittest.main()
def test_prime_numbers_one(self): self.assertNotIn(1, prime_numbers(10))
def test_prime_numbers_zero(self): self.assertEqual(prime_numbers(0, "Error"))
def test_prime_numbers_int(self): self.assertTrue(prime_numbers("b", "Try an integer "))