Skip to content

Instantly share code, notes, and snippets.

@AndyLPK247
Created March 14, 2017 02:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndyLPK247/187a8c562082b6867018316498f57daa to your computer and use it in GitHub Desktop.
Save AndyLPK247/187a8c562082b6867018316498f57daa to your computer and use it in GitHub Desktop.
Python Testing 101 pytest Example: Math Functions
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