Skip to content

Instantly share code, notes, and snippets.

@erochest
Last active August 16, 2016 14:32
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 erochest/c84a7fecfd66fb5057b30a03c41b2f9c to your computer and use it in GitHub Desktop.
Save erochest/c84a7fecfd66fb5057b30a03c41b2f9c to your computer and use it in GitHub Desktop.
def square(number):
number = int(number)
return number**2
import hw1
def test_1():
assert hw1.square(5) == 25
def test_2():
assert hw1.square(5.0) == 25
def test_3():
assert hw1.square('5') == 25
@erochest
Copy link
Author

erochest commented Aug 16, 2016

Run this by running

nose2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment