diff --git a/solutions/prime_number/tests_halilkaya.py b/solutions/prime_number/tests_halilkaya.py new file mode 100644 index 0000000..2874073 --- /dev/null +++ b/solutions/prime_number/tests_halilkaya.py @@ -0,0 +1,27 @@ +import pytest +from prime import is_prime + + +def test_negative(): + assert is_prime(-2) == False + +def test_zero(): + assert is_prime(0) == False + +def test_less_than_two(): + assert is_prime(1) == False + +def test_min_prime(): + assert is_prime(2) == True + +def test_positive(): + assert is_prime(47) == True + +def test_string(): + with pytest.raises(TypeError): + is_prime('47') + +def test_float(): + with pytest.raises(TypeError): + is_prime(49.9) +