Created
March 14, 2017 02:58
-
-
Save AndyLPK247/187a8c562082b6867018316498f57daa to your computer and use it in GitHub Desktop.
Python Testing 101 pytest Example: Math Functions
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
def add(a, b): | |
return a + b | |
def subtract(a, b): | |
return a - b | |
def multiply(a, b): | |
return a * b | |
def divide(a, b): | |
return a * 1.0 / b | |
def maximum(a, b): | |
return a if a >= b else b | |
def minimum(a, b): | |
return a if a <= b else b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment