def test_swap_curly(): for str in ('foo', u('foo foo foo bar'), 'foo béè b¡ð/ijə˘©þß®~¯æ', u('foo béè b¡ð/ijə˘©þß®~¯æ')): assert _swap_curly(str) == str assert _swap_curly('foo{bar}baz') == 'foo{{bar}}baz' assert _swap_curly('foo{{bar}}baz') == 'foo{bar}baz' assert _swap_curly('{foo}{{bar}}{baz}') == '{{foo}}{bar}{{baz}}' assert _swap_curly('{foo}{{{bar}}}{baz}') == '{{foo}}{{{bar}}}{{baz}}' assert _swap_curly('foo{ bar }baz') == 'foo{{ bar }}baz' assert _swap_curly('foo{ bar}baz') == 'foo{{ bar}}baz' assert _swap_curly('foo{bar }baz') == 'foo{{bar }}baz' assert _swap_curly('foo{{ bar }}baz') == 'foo{bar}baz' assert _swap_curly('foo{{bar }}baz') == 'foo{bar}baz' assert _swap_curly('foo{{ bar}}baz') == 'foo{bar}baz'
def test_swap_curly(): for str in ( 'foo', u'foo foo foo bar', 'foo béè b¡ð/ijə˘©þß®~¯æ', u'foo béè b¡ð/ijə˘©þß®~¯æ'): assert _swap_curly(str) == str assert _swap_curly('foo{bar}baz') == 'foo{{bar}}baz' assert _swap_curly('foo{{bar}}baz') == 'foo{bar}baz' assert _swap_curly('{foo}{{bar}}{baz}') == '{{foo}}{bar}{{baz}}' assert _swap_curly('{foo}{{{bar}}}{baz}') == '{{foo}}{{{bar}}}{{baz}}' assert _swap_curly('foo{ bar }baz') == 'foo{{ bar }}baz' assert _swap_curly('foo{ bar}baz') == 'foo{{ bar}}baz' assert _swap_curly('foo{bar }baz') == 'foo{{bar }}baz' assert _swap_curly('foo{{ bar }}baz') == 'foo{bar}baz' assert _swap_curly('foo{{bar }}baz') == 'foo{bar}baz' assert _swap_curly('foo{{ bar}}baz') == 'foo{bar}baz'
def test_swap_curly(): """Test swap curly function""" for str in ( 'foo', u('foo foo foo bar'), 'foo béè b¡ð/ijə˘©þß®~¯æ', u('foo béè b¡ð/ijə˘©þß®~¯æ')): assert _swap_curly(str) == str assert _swap_curly('foo{bar}baz') == 'foo{{bar}}baz' assert _swap_curly('foo{{bar}}baz') == 'foo{bar}baz' assert _swap_curly('{foo}{{bar}}{baz}') == '{{foo}}{bar}{{baz}}' assert _swap_curly('{foo}{{{bar}}}{baz}') == '{{foo}}{{{bar}}}{{baz}}' assert _swap_curly('foo{ bar }baz') == 'foo{{ bar }}baz' assert _swap_curly('foo{ bar}baz') == 'foo{{ bar}}baz' assert _swap_curly('foo{bar }baz') == 'foo{{bar }}baz' assert _swap_curly('foo{{ bar }}baz') == 'foo{bar}baz' assert _swap_curly('foo{{bar }}baz') == 'foo{bar}baz' assert _swap_curly('foo{{ bar}}baz') == 'foo{bar}baz'