B VXÿY ã@s<ddlmZddlZddlZddlmZGdd„deƒZdS)é)ÚTestCaseN)ÚStringIOc@s$eZdZdd„Zdd„Zdd„ZdS)Ú TestIndentc Csüdgdggdddddidd d œg}t d ¡}t |¡}tj|d d dd}tj|dd dd}tj|dd dd}t |¡}t |¡}t |¡} t |¡} | ||¡| ||¡| | |¡| | |¡| || d d¡¡| || d d¡¡| ||¡dS)NZblorpieZwhoopsz d-shtaeouz d-nthiouhz i-vhbjkhnthZniftyéWZyesF)ZfieldZ morefielda3 [ [ "blorpie" ], [ "whoops" ], [], "d-shtaeou", "d-nthiouh", "i-vhbjkhnth", { "nifty": 87 }, { "field": "yes", "morefield": false } ]ú T)ú,z: )ÚindentZ sort_keysÚ separatorsz é)ÚtextwrapÚdedentÚjsonÚdumpsÚloadsÚ assertEqualÚreplace) ÚselfÚhÚexpectÚd1Zd2Zd3Zd4Zh1Zh2Zh3Zh4©rúO/opt/alt/python37/lib64/python3.7/site-packages/simplejson/tests/test_indent.pyÚ test_indents(         zTestIndent.test_indentcs.ddi‰‡‡fdd„}|ddƒ|ddƒdS)NéécsDtjˆ|d}ˆ ||¡tƒ}tjˆ||dˆ | ¡|¡dS)N)r)r rrrÚdumpÚgetvalue)rZexpectedrZsio)rrrrÚcheck:s  z&TestIndent.test_indent0..checkrz { "3": 1 }z{"3": 1}r)rrr)rrrÚ test_indent08s zTestIndent.test_indent0cCs^ddddg}d}d}| |tj|ddd ¡| |tj|dd d ¡| |tj|dd ¡dS) Nrr réz[ 1, 2, 3, 4 ]z[ 1, 2, 3, 4 ]r)z, z: )rr )rz: )r)rr r)rZlstrZ expect_spacesrrrÚtest_separatorsGs zTestIndent.test_separatorsN)Ú__name__Ú __module__Ú __qualname__rrr rrrrrs0r)Zunittestrr Z simplejsonr Zsimplejson.compatrrrrrrÚs