ó ’Ė)Tc@sgddlmZddlmZmZmZmZmZddlZ d„Z defd„ƒYZ dS(iĸĸĸĸ(tTestCase(tStringIOt long_typetbt binary_typetPY3NcCs&tr"t|tƒr"|jdƒS|S(Ntascii(Rt isinstanceRtdecode(ts((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyt as_text_types tTestDumpcBsYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( cCs3tƒ}tji|ƒ|j|jƒdƒdS(Ns{}(Rtjsontdumpt assertEqualtgetvalue(tselftsio((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyt test_dump s cCsŸx˜dttgD]‡}|jtjtj|ƒƒ|kƒ|jtjtj|gƒƒd|kƒ|jtjtji|d6ƒƒd|kƒqWdS(Nita(tNonetTruetFalset assertTrueR tloadstdumps(Rtc((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyttest_constantss%,c Csųtdƒdfddtdftdfdtd ƒd fg}xz|D]r\}}|jtjtji||6ƒƒi||6ƒ|jtjtji||6d tƒƒi||6ƒqFW|j t tjid t6ƒxiid d 6id tdƒ6dd6gD]í}xättgD]Ö}t |ƒ}d |t*stskipkeyst(gð?s1.0(i R(NR ( RRRRRRR RRt assertRaisest TypeErrortdicttitems(RR.tktexpecttvR"tv0tv1((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyttest_stringify_keys:  "1  !($cCs|jtjiƒdƒdS(Ns{}(RR R(R((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyt test_dumps5scCs|jtjitt6tt6dtƒdƒ|jtjidd6tdƒd6dt6ttdƒ6d d 6dtƒd ƒdS( NR"s{"false": true, "true": false}g@iig@iiit7s3{"2": 3.0, "4.0": 5, "6": true, "7": 0, "false": 1}(RR RRRR(R((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyttest_encode_truefalse8s     cCsAd d dddg}tjtj|ƒƒ}|j|d ƒdS(Ntoneittwoitthreeitfouritfiveis6{"one": 1, "two": 2, "three": 3, "four": 4, "five": 5}(R8i(R9i(R:i(R;i(R<i(R Rt OrderedDictR(RR.R ((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyttest_ordered_dictFs cCsNdtfd„ƒY}tjdddgd|dƒƒ}|j|dƒd S( s A test against the regression mentioned at `github issue 29`_. The indent parameter should accept any type which pretends to be an instance of int or long when it comes to being multiplied by strings, even if it is not actually an int or long, for backwards compatibility. .. _github issue 29: http://github.com/simplejson/simplejson/issue/29 t AwesomeIntcBs eZdZd„Zd„ZRS(s'An awesome reimplementation of integersc_s<t|ƒdkr8t|dtƒr8|d|_q8ndS(Ni(tlenRtintt_int(Rtargstkwargs((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyt__init__^scSs*t|dƒr|j|Stdƒ‚dS(NRBsOTo do non-awesome things with this object, please construct it from an integer!(thasattrRBtNotImplementedError(RR#((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyt__mul__is (t__name__t __module__t__doc__RERH(((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyR?[s iiitindentis[ 0, 1, 2 ]N(tobjectR RR(RR?R ((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyt#test_indent_unknown_type_acceptanceNs $cCs3dgd}|jtjtj|ƒƒ|ƒdS(Nii †(RR RR(Rtlst((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyttest_accumulatorvs cCsx–tddƒD]…}td„t|ƒDƒƒ}tƒ}tj||dtƒ|j|jƒtj|dtƒƒ|jtj |jƒƒ|ƒqWdS(Nii css!|]}t|ƒ|fVqdS(N(tstr(R&tx((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pys ~sR"( trangeR-RR R RRRRR(Rtnum_keystpR((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyttest_sort_keys{s  %( RIRJRRR4R5R7R>RNRPRV(((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyR s       ( ( tunittestRtsimplejson.compatRRRRRt simplejsonR R R (((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_dump.pyts(