Example #1
0
 def test_output(self):
     results = prime_numbers(3)
     self.assertTrue(results ,  "The output cannot be an empty list")
Example #2
0
 def test_negative_numbers(self):
     self.assertEqual(prime_numbers(-1) , "You cannot enter negative numbers")
Example #3
0
	def test_prime_numbers_10(self):
		self.assertEqual(prime_numbers(10), [2,3,5,7] )
Example #4
0
 def test_prime_numbers(self):
     self.assertEqual(prime_numbers(5) , [2 , 3 ,5])
Example #5
0
	def test_prime_numbers_list(self):
		self.assertIs(type(prime_numbers(10), list ) )
Example #6
0
	def test_prime_numbers_len(self):
		self.assertTrue(len(prime_numbers(10)<10 )

if __name__ == '__main__ ':
    unittest.main()
Example #7
0
	def test_prime_numbers_one(self):
		self.assertNotIn(1, prime_numbers(10)) 
Example #8
0
	def test_prime_numbers_zero(self):
	 	self.assertEqual(prime_numbers(0, "Error"))
Example #9
0
	def test_prime_numbers_int(self):
	    self.assertTrue(prime_numbers("b", "Try an integer "))