From f82ffa553ea432e6b22b069cd47f9276a45b052c Mon Sep 17 00:00:00 2001 From: Simon Green Date: Sat, 3 Feb 2024 16:53:00 +1100 Subject: Simon's solution to challenge 254 --- challenge-254/sgreen/python/test.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 challenge-254/sgreen/python/test.py (limited to 'challenge-254/sgreen/python/test.py') diff --git a/challenge-254/sgreen/python/test.py b/challenge-254/sgreen/python/test.py new file mode 100755 index 0000000000..f9d9c15650 --- /dev/null +++ b/challenge-254/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.assertTrue(ch_1.three_power(27)) + self.assertTrue(ch_1.three_power(0)) + self.assertFalse(ch_1.three_power(6)) + + def test_ch_2(self): + self.assertEqual(ch_2.reverse_vowels('Raku'), 'Ruka') + self.assertEqual(ch_2.reverse_vowels('Perl'), 'Perl') + self.assertEqual(ch_2.reverse_vowels('Julia'), 'Jaliu') + self.assertEqual(ch_2.reverse_vowels('Uiua'), 'Auiu') + + +if __name__ == '__main__': + unittest.main() -- cgit