aboutsummaryrefslogtreecommitdiff
path: root/challenge-285/sgreen/python/test.py
diff options
context:
space:
mode:
authorConor Hoekstra <codereport@outlook.com>2024-09-09 16:34:38 -0400
committerConor Hoekstra <codereport@outlook.com>2024-09-09 16:34:38 -0400
commit2f3cf4f7cfa808d89e183b77f61dac80db4ab751 (patch)
tree9dcefb9d7860406bce98f0666cd99d7b608dd758 /challenge-285/sgreen/python/test.py
parent156e3186ef5b8f929e3589f8469463132e0fa996 (diff)
parent148ad068f27ef5bbdcac38b14685b2273b0d02ec (diff)
downloadperlweeklychallenge-club-2f3cf4f7cfa808d89e183b77f61dac80db4ab751.tar.gz
perlweeklychallenge-club-2f3cf4f7cfa808d89e183b77f61dac80db4ab751.tar.bz2
perlweeklychallenge-club-2f3cf4f7cfa808d89e183b77f61dac80db4ab751.zip
Merge branch 'master' of https://github.com/manwar/perlweeklychallenge-club
Diffstat (limited to 'challenge-285/sgreen/python/test.py')
-rwxr-xr-xchallenge-285/sgreen/python/test.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/challenge-285/sgreen/python/test.py b/challenge-285/sgreen/python/test.py
new file mode 100755
index 0000000000..5ac058a985
--- /dev/null
+++ b/challenge-285/sgreen/python/test.py
@@ -0,0 +1,22 @@
+#!/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.no_connection([['B', 'C'], ['D','B'], ['C','A']]), 'A'
+ )
+ self.assertEqual(ch_1.no_connection([['A', 'Z']]), 'Z')
+
+ def test_ch_2(self):
+ self.assertEqual(ch_2.making_change(9), 2)
+ self.assertEqual(ch_2.making_change(15), 6)
+ self.assertEqual(ch_2.making_change(100), 292)
+
+
+if __name__ == '__main__':
+ unittest.main()