Created
January 11, 2023 19:29
-
-
Save HectorTorres/77e356e008686503122ace8a8e0fa8fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def function_square(a): | |
return a*a | |
def function_square_root(a): | |
return math.sqrt(a) | |
def function_sum(a,b): | |
return a+b | |
def test_function_square(): | |
assert function_square(2) == 4 | |
def test_function_square_root(): | |
assert function_square_root(16) == 4 | |
def test_function_sum(): | |
assert function_sum(2,3) == 5 | |
test_function_square() | |
test_function_square() | |
test_function_sum() | |
#Run the file | |
#pytest test_pytest_02.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment