ó ÖÉÎSc@€sÚddlmZddlZddlZddlZddlZddlZddlZyddlm Z WnNe k r¼yddl m Z Wq½e k r¸ddl Z d„Z q½XnXdej fd„ƒYZdS(iÿÿÿÿ(twith_statementN(tstrip_python_stderrcC€s%tjdjƒdjƒ|ƒjƒS(Ns\[\d+ refs\]\r?\n?$t(tretsubtencodetstrip(tstderr((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyRs  tTestToolcB€sGeZdZejdƒZddd„Zd„Zd„Z d„Z RS(sÊ [["blorpie"],[ "whoops" ] , [ ], "d-shtaeou", "d-nthiouh", "i-vhbjkhnth", {"nifty":87}, {"morefield" : false,"field" :"yes"} ] s. [ [ "blorpie" ], [ "whoops" ], [], "d-shtaeou", "d-nthiouh", "i-vhbjkhnth", { "nifty": 87 }, { "field": "yes", "morefield": false } ] cC€sštjddg}|r(|j|ƒntj|dtjdtjdtjƒ}|j|ƒ\}}|jt|ƒdj ƒƒ|j|j dƒ|S(Ns-mssimplejson.tooltstdinRtstdoutRi( tsyst executabletextendt subprocesstPopentPIPEt communicatet assertEqualRRt returncode(tselftargstdatatargvtproctoutterr((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pytrunTool7s    cC€s2|j|jd|jjƒƒ|jjƒƒdS(NR(RRRRtexpect(R((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyttest_stdin_stdoutDscC€sdtjƒR}|j|jjƒƒ|jƒ|j|jd|jgƒ|j jƒƒWdQXdS(NR( ttempfiletNamedTemporaryFiletwriteRRtflushRRtnameR(Rtinfile((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyttest_infile_stdoutIs  c C€sçtjƒÕ}|j|jjƒƒ|jƒtjƒ}zl|j|jd|j|jgƒdjƒƒt |jdƒ&}|j|j ƒ|j jƒƒWdQXWd|j ƒt jj|jƒrÜt j|jƒnXWdQXdS(NRRtrb(RRR RRR!RRR"topentreadRtclosetostpathtexiststunlink(RR#toutfiletf((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyttest_infile_outfileQs   ) N( t__name__t __module__RttextwraptdedentRtNoneRRR$R/(((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyRs   (t __future__RR)R R2tunittestRRt test.supportRt ImportErrorttest.test_supportRtTestCaseR(((s@/usr/lib64/python2.7/site-packages/simplejson/tests/test_tool.pyts