def test_pair_broken(): assert pair_check('([[}])') == -1 assert pair_check('(){[]}[)') == -1
def test_pair_balanced(): assert pair_check('(){}[]') == 0
def test_pair_open(): # note that '([[}])' will return broken assert pair_check('([{}])[') == 1 assert pair_check('{()([])') == 1
def test_pair_balanced_nested(): assert pair_check('([{}])') == 0