MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / test_primes

Method test_primes

maths/prime_check.py:61–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59
60class Test(unittest.TestCase):
61 def test_primes(self):
62 assert is_prime(2)
63 assert is_prime(3)
64 assert is_prime(5)
65 assert is_prime(7)
66 assert is_prime(11)
67 assert is_prime(13)
68 assert is_prime(17)
69 assert is_prime(19)
70 assert is_prime(23)
71 assert is_prime(29)
72
73 def test_not_primes(self):
74 with pytest.raises(ValueError):

Callers

nothing calls this directly

Calls 1

is_primeFunction · 0.70

Tested by

no test coverage detected