Last active
December 19, 2015 03:49
-
-
Save andy47/5893166 to your computer and use it in GitHub Desktop.
Unittest tests for our example function.
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
from parse_conn import parse_connection | |
import unittest | |
class InvalidInputs(unittest.TestCase): | |
def testNoAt(self): | |
"""parse_connection should raise an exception | |
for an invalid connection string""" | |
self.assertRaises(ValueError, parse_connection, 'invalid uri') | |
if __name__ == "__main__": | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment