Last active
December 19, 2015 00:49
-
-
Save palmerabollo/5871901 to your computer and use it in GitHub Desktop.
Python #1
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 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