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)

[(8, 'py.tests.utils.test', 'test', (['vp.Solution.is_valid'], {}), False, 'from py.tests.utils import test\n'), (10, 'py.tests.utils.test', 'test', (['"""()"""'], {'result': '(True)'}), False, 'from py.tests.utils import test\n'), (11, 'py.tests.utils.test', 'test', (['"""()[]{}"""'], {'result': '(True)'}), False, 'from py.tests.utils import test\n'), (12, 'py.tests.utils.test', 'test', (['"""(]"""'], {'result': '(False)'}), False, 'from py.tests.utils import test\n'), (13, 'py.tests.utils.test', 'test', (['"""([)]"""'], {'result': '(False)'}), False, 'from py.tests.utils import test\n'), (14, 'py.tests.utils.test', 'test', (['"""{[]}"""'], {'result': '(True)'}), False, 'from py.tests.utils import test\n'), (15, 'py.tests.utils.test', 'test', (['""""""'], {'result': '(True)'}), False, 'from py.tests.utils import test\n'), (16, 'py.tests.utils.test', 'test', (['""")()"""'], {'result': '(False)'}), False, 'from py.tests.utils import test\n'), (17, 'py.tests.utils.test', 'test', (['"""(())((())))"""'], {'result': '(False)'}), False, 'from py.tests.utils import test\n')]