diff options
| author | Tyler Wardhaugh <tyler.wardhaugh@gmail.com> | 2021-02-10 09:57:23 -0800 |
|---|---|---|
| committer | Tyler Wardhaugh <tyler.wardhaugh@gmail.com> | 2021-02-12 09:31:25 -0800 |
| commit | dc48cb570de7841f7af41ba6e81ef64007c8059e (patch) | |
| tree | dd2217c742345d56926d8f57be3bcf51a40f3dfb /challenge-099/tyler-wardhaugh/python/test_ch1.py | |
| parent | 49cab280781c426e997c691635fce821977d8439 (diff) | |
| download | perlweeklychallenge-club-dc48cb570de7841f7af41ba6e81ef64007c8059e.tar.gz perlweeklychallenge-club-dc48cb570de7841f7af41ba6e81ef64007c8059e.tar.bz2 perlweeklychallenge-club-dc48cb570de7841f7af41ba6e81ef64007c8059e.zip | |
Ch99 (Python): Tasks 1 & 2
Diffstat (limited to 'challenge-099/tyler-wardhaugh/python/test_ch1.py')
| -rwxr-xr-x | challenge-099/tyler-wardhaugh/python/test_ch1.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/challenge-099/tyler-wardhaugh/python/test_ch1.py b/challenge-099/tyler-wardhaugh/python/test_ch1.py new file mode 100755 index 0000000000..94e18be7b3 --- /dev/null +++ b/challenge-099/tyler-wardhaugh/python/test_ch1.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + +import unittest +from ch1 import pattern_match + +class TestTask1(unittest.TestCase): + + + def test_example_cases(self): + self.assertTrue(pattern_match("abcde", "a*e")) + self.assertFalse(pattern_match("abcde", "a*d")) + self.assertFalse(pattern_match("abcde", "?b*d")) + self.assertTrue(pattern_match("abcde", "a*c?e")) + + +if __name__ == '__main__': + unittest.main() |
