-
-
Save uncoded-ro/f0f40bf6c4a0b491fdd46388952bf4fd to your computer and use it in GitHub Desktop.
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 | |
class TestHello(unittest.TestCase): | |
def test_hello_python(self): | |
self.assertEqual(hello.hello_python(), "Hello Python!") | |
def test_hello_name(self): | |
self.assertEqual(hello.hello_name(), "Hello Ghita!") | |
self.assertEqual(hello.hello_name("Marian"), "Hello Marian!") | |
self.assertRaises(ValueError, hello.hello_name, "M") | |
with self.assertRaises(ValueError): | |
hello.hello_name("M") | |
if __name__ == "__main__": | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment