Last active
July 16, 2018 11:07
-
-
Save kasvith/44562621d2627edca17781674feef0ed to your computer and use it in GitHub Desktop.
Hello World Test for python
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 | |
import hello | |
# Initialize a class to use with unittest framework | |
class HelloTest(unittest.TestCase): | |
# Test the hello world function from hello.py | |
def testHelloWorld(self): | |
# check whether the 'hello world' is returned by the method | |
self.assertEqual(hello.helloWorld(), 'hello world') | |
# run unit test | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment