summary refs log tree commit diff stats
path: root/python/two-fer/two_fer_test.py
blob: 90a2f937df1a29c3f4709d6657d1f799b731751f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import unittest

from two_fer import two_fer

# Tests adapted from `problem-specifications//canonical-data.json`


class TwoFerTest(unittest.TestCase):
    def test_no_name_given(self):
        self.assertEqual(two_fer(), "One for you, one for me.")

    def test_a_name_given(self):
        self.assertEqual(two_fer("Alice"), "One for Alice, one for me.")

    def test_another_name_given(self):
        self.assertEqual(two_fer("Bob"), "One for Bob, one for me.")


if __name__ == "__main__":
    unittest.main()