diff options
| author | Simon Green <mail@simon.green> | 2025-07-20 22:13:31 +1000 |
|---|---|---|
| committer | Simon Green <mail@simon.green> | 2025-07-20 22:13:31 +1000 |
| commit | 632d4c4c514525f8782e52e7f4f78fe5dfeef436 (patch) | |
| tree | f4ea97b2284568082d3df790af8d634651894a2c /challenge-330/sgreen/python/test.py | |
| parent | 6345c73edaafe1c1252e99cf8991c8fc27890445 (diff) | |
| download | perlweeklychallenge-club-632d4c4c514525f8782e52e7f4f78fe5dfeef436.tar.gz perlweeklychallenge-club-632d4c4c514525f8782e52e7f4f78fe5dfeef436.tar.bz2 perlweeklychallenge-club-632d4c4c514525f8782e52e7f4f78fe5dfeef436.zip | |
sgreen solutions to challenge 330
Diffstat (limited to 'challenge-330/sgreen/python/test.py')
| -rwxr-xr-x | challenge-330/sgreen/python/test.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/challenge-330/sgreen/python/test.py b/challenge-330/sgreen/python/test.py new file mode 100755 index 0000000000..89980aa8ca --- /dev/null +++ b/challenge-330/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.clear_digits("cab12"), "c") + self.assertEqual(ch_1.clear_digits("xy99"), "") + self.assertEqual(ch_1.clear_digits("pa1erl"), "perl") + + def test_ch_2(self): + self.assertEqual(ch_2.title_capital("PERL IS gREAT"), "Perl is Great") + self.assertEqual(ch_2.title_capital("THE weekly challenge"), "The Weekly Challenge") + self.assertEqual(ch_2.title_capital("YoU ARE A stAR"), "You Are a Star") + + +if __name__ == '__main__': + unittest.main() |
