Add python/two-fer

This commit is contained in:
dwrz
2021-11-12 21:16:20 +00:00
parent 539fc995fd
commit d83e227af4
6 changed files with 138 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
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()