Skip to content

Instantly share code, notes, and snippets.

@palmerabollo
Last active December 19, 2015 00:49
Show Gist options
  • Save palmerabollo/5871901 to your computer and use it in GitHub Desktop.
Save palmerabollo/5871901 to your computer and use it in GitHub Desktop.
Python #1
import unittest
def IsOdd(n):
return n % 2 == 1
class IsOddTests(unittest.TestCase):
def testOne(self):
self.failUnless(IsOdd(1))
def testTwo(self):
self.failIf(IsOdd(2))
def main():
unittest.main()
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment