o \Փa @s<ddlmZddlZddlZddlmZGdddeZdS))TestCaseN)StringIOc@s$eZdZddZddZddZdS) TestIndentc Csdgdggdddddidd d g}td }t|}tj|d d dd}tj|dd dd}tj|dd dd}t|}t|}t|} t|} |||||||| ||| ||||d d|||d d|||dS)Nblorpiewhoopsz d-shtaeouz d-nthiouhz i-vhbjkhnthniftyWyesF)field morefielda3 [ [ "blorpie" ], [ "whoops" ], [], "d-shtaeou", "d-nthiouh", "i-vhbjkhnth", { "nifty": 87 }, { "field": "yes", "morefield": false } ] T,: )indent sort_keys separatorsz )textwrapdedentjsondumpsloads assertEqualreplace) selfhexpectd1d2d3d4h1h2h3h4r&>/usr/lib/python3/dist-packages/simplejson/tests/test_indent.py test_indents(          zTestIndent.test_indentcs.ddifdd}|dd|dddS)NcsDtj|d}||t}tj||d||dS)Nr)rrrrdumpgetvalue)rexpectedrsiorrr&r'check:s  z&TestIndent.test_indent0..checkrz { "3": 1 }z{"3": 1}r&)rr1r&r0r' test_indent08s zTestIndent.test_indent0cCsZgd}d}d}||tj|ddd||tj|ddd||tj|dddS) N)r*rr)z[ 1, 2, 3, 4 ]z[ 1, 2, 3, 4 ]r)z, r)rrr r+)rrr)rlstr expect_spacesr&r&r'test_separatorsGs zTestIndent.test_separatorsN)__name__ __module__ __qualname__r(r2r6r&r&r&r'rs0 r)unittestrr simplejsonrsimplejson.compatrrr&r&r&r's