Beispiel #1
0
 def test_negative_numbers(self):
     self.assertEqual(prime_gen(-3), 'Negatives not allowed')
Beispiel #2
0
 def test_result(self):
     self.assertEqual(prime_gen(3), 12, 'Number is not prime')
Beispiel #3
0
 def test_decimal_inputs(self):
     self.assertEqual(prime_gen(1.1), 'Decimal inputs are not allowed')
Beispiel #4
0
 def test_float_inputs(self):
     self.assertEqual(prime_gen(0.112), 'Floating point inputs not allowed')
Beispiel #5
0
 def test_string_inputs(self):
     self.assertEqual(prime_gen(str), 'String inputs not valid')