exercism

Exercism solutions.
git clone git://code.dwrz.net/exercism
Log | Files | Refs

two_fer_test.py (524B)


      1 import unittest
      2 
      3 from two_fer import (
      4     two_fer,
      5 )
      6 
      7 # Tests adapted from `problem-specifications//canonical-data.json`
      8 
      9 
     10 class TwoFerTest(unittest.TestCase):
     11     def test_no_name_given(self):
     12         self.assertEqual(two_fer(), "One for you, one for me.")
     13 
     14     def test_a_name_given(self):
     15         self.assertEqual(two_fer("Alice"), "One for Alice, one for me.")
     16 
     17     def test_another_name_given(self):
     18         self.assertEqual(two_fer("Bob"), "One for Bob, one for me.")
     19 
     20 
     21 if __name__ == "__main__":
     22     unittest.main()