import unittest
from py.tests.utils import test
from py import valid_parentheses as vp


class TestValidParentheses(unittest.TestCase):

    @test(vp.Solution.is_valid)
    def test_valid_parentheses(self) -> None:
        test("()",          result=True)
        test("()[]{}",      result=True)
        test("(]",          result=False)
        test("([)]",        result=False)
        test("{[]}",        result=True)
        test("",            result=True)
        test(")()",         result=False)
        test("(())((())))", result=False)

[((142, 168), 'py.tests.utils.test', 'test', (['vp.Solution.is_valid'], {}), '(vp.Solution.is_valid)\n', (146, 168), False, 'from py.tests.utils import test\n'), ((223, 246), 'py.tests.utils.test', 'test', (['"""()"""'], {'result': '(True)'}), "('()', result=True)\n", (227, 246), False, 'from py.tests.utils import test\n'), ((264, 291), 'py.tests.utils.test', 'test', (['"""()[]{}"""'], {'result': '(True)'}), "('()[]{}', result=True)\n", (268, 291), False, 'from py.tests.utils import test\n'), ((305, 329), 'py.tests.utils.test', 'test', (['"""(]"""'], {'result': '(False)'}), "('(]', result=False)\n", (309, 329), False, 'from py.tests.utils import test\n'), ((347, 373), 'py.tests.utils.test', 'test', (['"""([)]"""'], {'result': '(False)'}), "('([)]', result=False)\n", (351, 373), False, 'from py.tests.utils import test\n'), ((389, 414), 'py.tests.utils.test', 'test', (['"""{[]}"""'], {'result': '(True)'}), "('{[]}', result=True)\n", (393, 414), False, 'from py.tests.utils import test\n'), ((430, 451), 'py.tests.utils.test', 'test', (['""""""'], {'result': '(True)'}), "('', result=True)\n", (434, 451), False, 'from py.tests.utils import test\n'), ((471, 496), 'py.tests.utils.test', 'test', (['""")()"""'], {'result': '(False)'}), "(')()', result=False)\n", (475, 496), False, 'from py.tests.utils import test\n'), ((513, 546), 'py.tests.utils.test', 'test', (['"""(())((())))"""'], {'result': '(False)'}), "('(())((())))', result=False)\n", (517, 546), False, 'from py.tests.utils import test\n')]