interactive-coding-challenges/templates/test_foo.py

20 lines
329 B
Python
Raw Normal View History

import unittest
2015-07-03 11:01:32 +08:00
class TestFoo(unittest.TestCase):
2015-07-03 11:01:32 +08:00
def test_foo(self):
self.assertEqual(foo(None), None)
self.assertEqual(foo(0), 0)
self.assertEqual(foo('bar'), 'bar')
2015-07-03 11:01:32 +08:00
print('Success: test_foo')
2015-07-03 11:01:32 +08:00
def main():
test = TestFoo()
test.test_foo()
2015-07-03 11:01:32 +08:00
if __name__ == '__main__':
main()