Exemple #1
0
def test_output_positive_numers_only(self):
    getResult = getPrime(10)
    for i in getResult:
        self.assertTrue(i > 0)
Exemple #2
0
def test__if_output_is_empty(self):
    self.assertTrue(getPrime(10) != None)
Exemple #3
0
def test_if_all_the_values_are_prime(self):
    result = getPrime(10)
    self.assertEqual(result, [2, 3, 5, 7], msg="value is not a prime number")
Exemple #4
0
def test_if_output_list(self):
    self.assertTrue(type(getPrime(10)) == list, msg="output is not a list")
Exemple #5
0
def test_if_value_is_integer(self):
    with self.assertRaises(TypeError):
        getPrime('success')