aboutsummaryrefslogtreecommitdiff
path: root/challenge-131/tyler-wardhaugh/python/test_ch2.py
blob: 707951e3e4629572e9fec3f3e686fd5277232fc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python3
"""Test Task 2"""

import unittest
from ch2 import find_pairs


class TestTask2(unittest.TestCase):
    """Test Task 2"""

    def test_example_cases(self):
        """Test Task 2"""
        self.assertEqual(('"(["', '")]"'),
                find_pairs('""[]()', '"I like (parens) and the Apple ][+" they said.'))
        self.assertEqual(("/**/<", "/**/>"),
                find_pairs("**//<>", "/* This is a comment (in some languages) */ <could be a tag>"))


if __name__ == '__main__':
    unittest.main()