test_foo.py 358 B

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