Spade

Mini Shell

Directory:~$ /proc/self/root/usr/lib64/python2.7/site-packages/simplejson/tests/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //proc/self/root/usr/lib64/python2.7/site-packages/simplejson/tests/test_fail.pyo

�
���Sc:@s
ddlZddlmZddlZddddddd	d
dd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_infotassertEqualtpostlinenotcolnot	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,it"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.pyt<module>s�