ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ;Pc@sdZddlZdefdYZdefdYZdefdYZd ZdZda d Z d Z d Z d Z ddZdZdZyed ZWnek rdZnXddlZejdkrdZnNejdkr9dZer?eddZejdkr6dZq6q?ndZ[ddlmZedZddZdZd Zd!Zddl Z d"d*d#YZ!dd$Z"dd%Z#d&Z$dd'Z%d(e j&fd)YZ&dS(+siSupporting definitions for the Heapy regression test. Addapted from Python standard module test_support. iNtErrorcBseZdZRS(s*Base class for regression test exceptions.(t__name__t __module__t__doc__(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyR st TestFailedcBseZdZRS(s Test failed.(RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyR st TestSkippedcBseZdZRS(s!Test skipped. This can be raised to indicate that a test was deliberatly skipped, but not because a feature wasn't available. For example, if some resource can't be used, such as the network appears to be unavailable, this should be raised instead of TestFailed. (RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyRsicCs |adS(N(t_original_stdout(tstdout((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytrecord_original_stdout scCs tp tjS(N(RtsysR(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytget_original_stdout$scCs&ytj|=Wntk r!nXdS(N(R tmodulestKeyError(tname((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytunload's cCsit|ddl}xLtjD]A}y$|j|jj||dWq |jk r`q Xq WdS(Nis.pyc(RtosR tpathtunlinktjointerror(tmodnameRtdirname((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytforget-s  $cCsDtdk r@|tkr@|dkr1d|}nt|ndS(Ns$Use of the `%s' resource not enabled(t use_resourcestNoneR(tresourcetmsg((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytrequires6s  gư>cCs?t|tdks0t|tdkryMt||\}}t|t|t}t|||kr|dSWq2q2Xnt|t|kr2t|tdtgfkr2xPttt|t|D]-}t||||}|dkr|SqWtt|t|St||S(Ngi(( ttypetcoercetabstFUZZtrangetmintlentfcmptcmp(txtytfuzztitoutcome((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyR#>s0<( itjavas$testtriscoss@tests@test-slatin-1tnttmbcsttest(RcCsddl}|jj|r"|Stj}|jj|g|}x9|D]1}|jj||}|jj|rK|SqKW|S(Ni(RRtisabsR RRtexists(tfilethereRRtdntfn((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytfindfilegs   s test failedcCs|st|ndS(sVerify that condition is true. If not, raise TestFailed. The optional argument reason can be given to provide a better error text. N(R(t conditiontreason((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytverifyrscCs&||ks"td||fndS(s$Raise TestFailed if a == b is false. This is better than verify(a == b) because, in case of failure, the error message incorporates repr(a) and repr(b) so you can see the inputs. Note that "not (a == b)" isn't necessarily the same as "a != b"; the former is tested. s%r == %rN(R(tatb((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytvereq|s cCsJ|j}|jg|D]}d|^q}dj|}d|S(s%Like repr(dict), but in sorted order.s%r: %rs, s{%s}(titemstsortR(tdictR<tpairt reprpairst withcommas((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytsortdicts   cCs5yt|ddWntk r'n Xd|GHdS(NstexecsMissing SyntaxError: "%s"(tcompilet SyntaxError(t statement((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyt check_syntaxs  tBasicTestRunnercBseZdZRS(cCstj}|||S(N(tunittestt TestResult(tselfR.tresult((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytruns  (RRRM(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyRHscCstr!tjtjdd}n t}|j|}|jst|j dkrx|j rx|j dd}njt|j dkr|j r|j dd}n7|dkrd}nd|j |j f}t|t|ndS(s2Run tests from a unittest.TestSuite-derived class.t verbosityiiis0errors occurred; run in verbose mode for detailsserrors occurred in %s.%sN(tverboseRItTextTestRunnerR RRHRMt wasSuccessfulR"terrorstfailuresRRRR(tsuitet testclasstrunnerRLterrR((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyt run_suites     cCs3tj|}|r"|jn t||dS(s1Run tests from a unittest.TestCase-derived class.N(RIt makeSuitetdebugRX(RURZRT((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyt run_unittests cCst|dddS(s4 Debug tests from a unittest.TestCase-derived class.RZiN(R[(RU((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytdebug_unittestscCsddl}|dkr!t}nd}tj}tt_zH|j|d|\}}|rytd||fn||fSWd|t_XdS(s Run doctest on the given module. Return (#failures, #tests). If optional argument verbosity is not specified (or is None), pass test_support's belief about verbosity on to doctest. Else doctest's usual behavior is used (it searches sys.argv for -v). iNROs%d of %d doctests failed(tdoctestRROR RR ttestmodR(tmoduleRNR]t save_stdouttftt((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyt run_doctests     tTestCasecBs2eZdZddZddZdZRS(cCsddlm}||_|jj|_|jj|_|jj|_|jj|_|jj|_|jj|_|jj|_|jj |_ |jj |_ dS(Ni(tRoot( tguppyRetpythontheapytParttImpSettUsetViewt allocation_behaves_as_originallytisotidset(RKRe((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytsetUps icCsZ||krVdG|GHdG|GH|dkrV|dkrCtjqS|jdqVndS(Nsaseq: Expected: b = sGot actually : a = i(tpdbt set_tracetassert_(RKR9R:tcont((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytaseqs      cCsZ||k rVdG|GHdG|GH|dkrV|dkrCtjqS|jdqVndS(Nsasis: Expected: b = sGot actually : a = i(RqRrRs(RKR9R:Rt((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytasiss      cCsdS(N((RK((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyttearDowns(RRRpRuRvRw(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pyRds (('RR t ExceptionRRRRORRRRR RRRRR#tunicodet have_unicodet NameErrorRR tTESTFNtTESTFN_UNICODEtTESTFN_ENCODINGRt__file__R5R8R;RBRGRIRHRXR[R\RcRd(((sK/opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/test/support.pytsV