# Let's make sure pytest and ipytest packages are installed
# ipytest is required for running pytest inside Jupyter notebooks
import sys
!{sys.executable} -m pip install pytest
!{sys.executable} -m pip install ipytest
# These are needed for running pytest inside Jupyter notebooks
import ipytest
ipytest.autoconfig()
There is an implementation for get_divisible_by_five
function in the cell below. Your task is to create a test case for this function to verify that it works correctly.
def get_divisible_by_five(numbers):
"""Returns a list of numbers which are divisible by five in the list got as an argument"""
result = []
for num in numbers:
if not num % 5:
result.append(num)
return result
%%ipytest
def test_get_divisible_by_five():
# Your implementation here