aboutsummaryrefslogtreecommitdiff
path: root/challenge-320/sgreen/python/test.py
diff options
context:
space:
mode:
authorDave Jacoby <jacoby.david@gmail.com>2025-05-15 16:45:20 -0400
committerGitHub <noreply@github.com>2025-05-15 16:45:20 -0400
commitefc2a652edb6436965e12883bedf035ea081284d (patch)
tree7e9940d4f72fe1e8d984b3746af2d30dff96330b /challenge-320/sgreen/python/test.py
parent6886bd3e06ccf8b0a564f3c434cd53131d126f70 (diff)
parented7588dadb77d63adca3d3aefc6cd325164e0947 (diff)
downloadperlweeklychallenge-club-efc2a652edb6436965e12883bedf035ea081284d.tar.gz
perlweeklychallenge-club-efc2a652edb6436965e12883bedf035ea081284d.tar.bz2
perlweeklychallenge-club-efc2a652edb6436965e12883bedf035ea081284d.zip
Merge branch 'manwar:master' into master
Diffstat (limited to 'challenge-320/sgreen/python/test.py')
-rwxr-xr-xchallenge-320/sgreen/python/test.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/challenge-320/sgreen/python/test.py b/challenge-320/sgreen/python/test.py
new file mode 100755
index 0000000000..81900ad922
--- /dev/null
+++ b/challenge-320/sgreen/python/test.py
@@ -0,0 +1,21 @@
+#!/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.maximum_count([-3, -2, -1, 1, 2, 3]), 3)
+ self.assertEqual(ch_1.maximum_count([-2, -1, 0, 0, 1]), 2)
+ self.assertEqual(ch_1.maximum_count([1, 2, 3, 4]), 4)
+
+ def test_ch_2(self):
+ self.assertEqual(ch_2.sum_difference([1, 23, 4, 5]), 18)
+ self.assertEqual(ch_2.sum_difference([1, 2, 3, 4, 5]), 0)
+ self.assertEqual(ch_2.sum_difference([1, 2, 34]), 27)
+
+
+if __name__ == '__main__':
+ unittest.main()