Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(verify.py): implemented function verify and its test #172

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/is_element_in_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def is_element_in_list(values:list[int], value:int ) -> bool:
for x in values:
if x == value:
return True
return False
7 changes: 7 additions & 0 deletions tests/test_is_element_in_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from src.is_element_in_list import is_element_in_list
import pytest

@pytest.mark.parametrize("input_1", [[1, 2, 3]])
@pytest.mark.parametrize("input_2, expected", [(2, True), (4, False)])
def test_is_element_in_list(input_1:list, input_2:int, expected:bool) -> None:
assert is_element_in_list(input_1, input_2) == expected
Loading