test_foo.py (358B)
1 #! /usr/bin/env python 2 # encoding: utf-8 3 # Calle Rosenquist, 2016 (xbreak) 4 5 import unittest 6 from foo import foo 7 8 class test_foo(unittest.TestCase): 9 def test_add_integers(self): 10 self.assertEqual(7, foo.sum(4, 3)) 11 12 def test_add_strings(self): 13 self.assertEqual('foobar', foo.sum('foo', 'bar')) 14 15 def test_foo(self): 16 self.assertEqual('pong', foo.ping())