ó ÖÉÎSc:@s ddlZddlmZddlZddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<g:Zid=d>6d?d@6ZdAefdB„ƒYZdS(CiÿÿÿÿN(tTestCases<"A JSON payload should be an object or array, not a string."s["Unclosed array"s%{unquoted_key: "keys must be quoted"}s["extra comma",]s["double extra comma",,]s[ , "<-- missing value"]s["Comma after the close"],s["Extra close"]]s{"Extra comma": true,}s:{"Extra value after close": true} "misplaced quoted value"s{"Illegal expression": 1 + 2}s{"Illegal invocation": alert()}s+{"Numbers cannot have leading zeroes": 013}s{"Numbers cannot be hex": 0x14}s"["Illegal backslash escape: \x15"]s[\naked]s"["Illegal backslash escape: \017"]s2[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]s{"Missing colon" null}s{"Double colon":: null}s {"Comma instead of colon", null}s!["Colon instead of comma": false]s["Bad value", truth]s['single quote']s[" tab character in string "]s&["tab\ character\ in\ string\ "]s["line break"]s["line\ break"]s[0e]s[0e+]s[0e+-1]s({"Comma instead if closing brace": true,s ["mismatch"}u$["AZ control characters in string"]t{s{]s{"foo": "bar"]s {"foo": "bar"tnultnulxt-s-xs-es-e0s -Infinites-InftInfinittInfinitetNaMtNuNtfalsytfalttrugttrut1et1exs1e-s1e-xswhy not have a string payload?is,spec doesn't specify any nesting limitationsitTestFailcBs#eZd„Zd„Zd„ZRS(cCs‰x‚ttƒD]t\}}|d}|tkrBtj|ƒq nytj|ƒWntjk riq X|jd||fƒq WdS(Nis$Expected failure for fail%d.json: %r(t enumeratetJSONDOCStSKIPStjsontloadstJSONDecodeErrortfail(tselftidxtdoc((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_fail.pyt test_failuresms   cCsÐxÉddgD]»}ytj|ƒWn”tjk rƒtjƒd}|j|jdƒ|j|jdƒ|j|jdƒq t k rºtjƒd}|j d||fƒq X|j dƒq WdS(Nu[,]s[,]iis!Unexpected exception raised %r %ss Unexpected success parsing '[,]'( RRRtsystexc_infot assertEqualtpostlinenotcolnot ExceptionR(RRte((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_fail.pyttest_array_decoder_issue46zs cCs3d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6g}xð|D]è\}}}ytj|ƒWn±tjk rßtjƒd}|j|jt|ƒ |d!|j||fƒ|j|j|d"|j||fƒqCt k rtjƒd}|j d#||fƒqCX|j d$|fƒqCWdS(7NtsExpecting valueit[sExpecting value or ']'is[42sExpecting ',' delimiteris[42,is["sUnterminated string starting ats["spams["spam"is["spam",iRs1Expecting property name enclosed in double quotess{"s{"spams{"spam"sExpecting ':' delimiters{"spam":s {"spam":42i s {"spam":42,i t"s"spams[,s%r doesn't start with %r for %rspos %r != %r for %rs!Unexpected exception raised %r %ssUnexpected success parsing '%r'(R$sExpecting valuei(R%sExpecting value or ']'i(s[42sExpecting ',' delimiteri(s[42,sExpecting valuei(s["sUnterminated string starting ati(s["spamsUnterminated string starting ati(s["spam"sExpecting ',' delimiteri(s["spam",sExpecting valuei(Rs1Expecting property name enclosed in double quotesi(s{"sUnterminated string starting ati(s{"spamsUnterminated string starting ati(s{"spam"sExpecting ':' delimiteri(s{"spam":sExpecting valuei(s {"spam":42sExpecting ',' delimiteri (s {"spam":42,s1Expecting property name enclosed in double quotesi (R&sUnterminated string starting ati(s"spamsUnterminated string starting ati(s[,sExpecting valuei( RRRRRRtmsgtlenRR!R(Rt test_casestdataR'RR"((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_fail.pyttest_truncated_inputŠsF   (t__name__t __module__RR#R+(((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_fail.pyRls (RtunittestRt simplejsonRRRR(((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_fail.pyts€