aboutsummaryrefslogtreecommitdiff
path: root/challenge-255/sgreen/python/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-255/sgreen/python/test.py')
-rwxr-xr-xchallenge-255/sgreen/python/test.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/challenge-255/sgreen/python/test.py b/challenge-255/sgreen/python/test.py
new file mode 100755
index 0000000000..af2c369e5f
--- /dev/null
+++ b/challenge-255/sgreen/python/test.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+import unittest
+ch_1 = __import__('ch-1')
+ch_2 = __import__('ch-2')
+
+
+class TestClass(unittest.TestCase):
+ def test_ch_1(self):
+ self.assertEqual(ch_1.odd_character('Perl', 'Preel'), 'e')
+ self.assertEqual(ch_1.odd_character('Weekly', 'Weeakly'), 'a')
+ self.assertEqual(ch_1.odd_character('Box', 'Boxy'), 'y')
+
+ def test_ch_2(self):
+ self.assertEqual(ch_2.most_frequent_word('Joe hit a ball, the hit ball flew far after it was hit.', 'hit'), 'ball')
+ self.assertEqual(ch_2.most_frequent_word('Perl and Raku belong to the same family. Perl is the most popular language in the weekly challenge.', 'the'), 'perl')
+
+
+if __name__ == '__main__':
+ unittest.main()