ÿØÿà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Áß_ÿÙ A[cJ@`s dZddlmZmZmZmZddlmZddlm Z m Z m Z m Z m Z mZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZeedsddlZnddlZddlZddlZddlZddl Z yddl!Z!Wn!e"k rwddl#m!Z!nXddl$Z$ddl%Z&ddl'Z'ddl(Z(y@ej)rddl*Z*ddl+Z+nddl,Z*ddl+Z+Wne"k rdZ*dZ+nXyddl.Z/Wne"k r1dZ/nXyddl0Z0Wne"k r[dZ0nXyddl1Z1Wne"k rdZ1nXyddl2Z2Wne"k rdZ2nXyddl3Z3Wne"k rdZ3nXdd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQgJZ4dRe5fdSYZ6dTe6fdUYZ7dVej8fdWYZ9ej:e;dXZ<e=dYZ>dZZ?d[Z@d\ZAdde=d]ZBd^ZCd_ZDdZEdaFdaGe=ZHdZIdaJd`ZKdaZLdbZMejjNdcre=ddZOdeZPdfZQdgZRnejSZPejTZQejUZRdhZSdiZTdjZUdkZVdlZWejjNdcrYddlXZXddlYZXdmZZn dnZZdoZ[ddpZ\dqZ]drZ^dsZ_dtZ`duZadvZbejcejddwZeeadxZfdyZgegZhdZidZjejke0d}Zlejke2d~Zmejke3dZnejjNdZoejpdkrFdZqndZqdjreqejsZqejtZuej:de=ddZveedrej:dZwnexddZydZzdZ{dZ|dZ}dZ~defdYZe=dZej:dZdefdYZej)rYddlZejjZnddlZejZdefdYZdefdYZdefdYZeedejZeejdejZeedejZej:dddZej:dZdZdZdZdZej:dZdZdZdZeedrdeZdZnedZdZdZdZdZdZdZdZdZd{eZdeZdzeZejZdZdefdYZe;dZdZdefdYZdZdZdZddZdZdZdZdZdZdZdZdddZdZdZdZdZdZdZej:dZej:dZdZdZde&jjfdYZdefdYZdadZdZdadZdZejjNdcr ej:dZnej:dZdZdS(uwSupporting definitions for the Python regression tests. Backported for python-future from Python 3.3 test/support.py. i(tabsolute_importtdivisiontprint_functiontunicode_literals(tutils(tstrtrangetopentinttmaptlistNuskip(t sysconfiguErroru TestFaileduResourceDeniedu import_moduleuverboseu use_resourcesu max_memuseurecord_original_stdoutuget_original_stdoutuunloaduunlinkurmtreeuforgetuis_resource_enabledurequiresurequires_freebsd_versionurequires_linux_versionurequires_mac_verufind_unused_portu bind_portu IPV6_ENABLEDu is_jythonuTESTFNuHOSTuSAVEDCWDutemp_cwdufindfileucreate_empty_fileusortdictucheck_syntax_erroruopen_urlresourceucheck_warningsu CleanImportuEnvironmentVarGuarduTransientResourceucaptured_stdoutucaptured_stdinucaptured_stderrutime_outusocket_peer_resetuioerror_peer_reseturun_with_localeu temp_umaskutransient_internetu set_memlimitu bigmemtestubigaddrspacetestuBasicTestRunneru run_unittestu run_doctestuthreading_setuputhreading_cleanupu reap_childrenu cpython_onlyucheck_impl_detailu get_attributeu swap_itemu swap_attrurequires_IEEE_754u TestHandleruMatcheru can_symlinkuskip_unless_symlinkuskip_unless_xattruimport_fresh_moduleu requires_zlibu PIPE_MAX_SIZEufailfastuanticipate_failureu run_with_tzu requires_gzipu requires_bz2u requires_lzmausuppress_crash_popuptErrorcB`seZdZRS(u*Base class for regression test exceptions.(t__name__t __module__t__doc__(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyR bst TestFailedcB`seZdZRS(u Test failed.(R RR(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRestResourceDeniedcB`seZdZRS(uTest skipped because it requested a disallowed resource. This is raised when a test calls requires() for a resource that has not be enabled. It is used to distinguish between expected and unexpected skips. (R RR(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRhscc`s=|r4tjtjddtdVWdQXndVdS(uContext manager to suppress package and module deprecation warnings when importing them. If ignore is False, this context manager has no effect.uignoreu.+ (module|package)N(twarningstcatch_warningstfilterwarningstDeprecationWarning(tignore((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt_ignore_deprecated_importsps   c C`sSt|Aytj|SWn(tk rH}tjt|nXWdQXdS(uImport and return the module to be tested, raising SkipTest if it is not available. If deprecated is True, any module or package deprecation messages will be suppressed.N(Rt importlibt import_modulet ImportErrortunittesttSkipTestR(tnamet deprecatedtmsg((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRs  cC`s|tjkr&t|tj|=nxTttjD]C}||ks[|j|dr6tj|||t(RtexpectedFailure(t condition((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytanticipate_failuresc C`st|i}g}t||zyax|D]}t||q3Wx-|D]%}t||sQ|j|qQqQWtj|}Wntk rd}nXWdx'|jD]\} } | t j | Create an empty file. If the file already exists, truncate it.N(RJRtO_WRONLYtO_CREATtO_TRUNCR(RZtfd((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytcreate_empty_fileUs#cC`sFt|j}g|D]}d|^q}dj|}d|S(u%Like repr(dict), but in sorted order.u%r: %ru, u{%s}(tsortedR4R^(tdictR4tpairt reprpairst withcommas((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytsortdictZscC`s9ttd}z|jSWd|jttXdS(u` Create an invalid file descriptor by opening and closing a file and return its fd. uwbN(RtTESTFNtfilenoRRY(R((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt make_bad_fdas  cC`s|jtt|dddS(Nu uexec(t assertRaisest SyntaxErrortcompile(ttestcaset statement((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytcheck_syntax_errormsc `s~ddlm}m}jdd|j|djdd}tjj tjj t d|}fd}tjj |r||}|dk r|St |ntd td |d t|j|d d }zNt|d9} |j} x#| r8| j| |j} qWWdQXWd|jX||}|dk rj|Std|dS(Ni(trequesttparseucheckiu/iudatac`sMt|}dkr"|S|r?|jd|S|jdS(Ni(RR*tseekR(RR-(RtcheckR(sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytcheck_valid_file{s   uurlfetchu fetching %s ...RRViuwbuinvalid resource %r(tfuture.backports.urllibRRtpopR*turlparseRLRJRKR^RUt__file__RRYRtprintRGturlopenRtreadtwriteRR( turlRRturllib_requestt urllib_parseRZRRR-toutts((RRRsN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytopen_urlresourceqs0 $           tWarningsRecordercB`s8eZdZdZdZedZdZRS(uyConvenience wrapper for the warnings list returned on entry to the warnings.catch_warnings() context manager. cC`s||_d|_dS(Ni(t _warningst_last(tselft warnings_list((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt__init__s cC`s\t|j|jkr,t|jd|S|tjjkrBdStd||fdS(Niu%r has no attribute %r( tlenRRR?RtWarningMessaget_WARNING_DETAILSR*R@(Rtattr((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt __getattr__s cC`s|j|jS(N(RR(R((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRscC`st|j|_dS(N(RRR(R((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytresets(R RRRRtpropertyRR(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRs   c c`stjd}|jjd}|rgtjr=|jqgx'tt|D]}|j qPWnt j dt &}tj djdt|VWdQXt|}g}x|D]\}} t} x^|D]U}|j} tj|t| tjrt| j| rt } |j|qqW| r| r|j|| jfqqW|rutd|dn|rtd |dndS( uCatch the warnings, then check if all the expected warnings have been raised and re-raise unexpected warnings. If 'quiet' is True, only re-raise the unexpected warnings. iu__warningregistry__trecorduwarningsualwaysNuunhandled warning %siu)filter (%r, %s) did not catch any warning(R RRRRtPY3tclearRRRRRR'R!t simplefilterRR R)tmessagetretmatchRtIt issubclasst __class__tremoveR3R tAssertionError( tfiltersRtframetregistrytitwtreraisetmissingRtcattseentwarning((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt_filterwarningss6    cO`sI|jd}|s<dtff}|dkr<t}q<nt||S(uContext manager to silence warnings. Accept 2-tuples as positional arguments: ("message regexp", WarningCategory) Optional argument: - if 'quiet' is True, it does not fail if a filter catches nothing (default True without argument, default False if some filters are defined) Without argument, it defaults to: check_warnings(("", Warning), quiet=True) uquietuN(RtWarningR*R'R(RtkwargsR((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytcheck_warningss   t CleanImportcB`s)eZdZdZdZdZRS(u,Context manager to force import to return a new module reference. This is useful for testing module-level behaviours, such as the emission of a DeprecationWarning on import. Use like this: with CleanImport("foo"): importlib.import_module("foo") # new reference cG`sotjj|_xV|D]N}|tjkrtj|}|j|krZtj|j=ntj|=qqWdS(N(R R!tcopytoriginal_modulesR (Rt module_namest module_nameR<((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRs  cC`s|S(N((R((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt __enter__scG`stjj|jdS(N(R R!tupdateR%(Rt ignore_exc((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt__exit__s(R RRRR(R+(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyR#s  tEnvironmentVarGuardcB`sqeZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z RS( u_Class to help protect the environment variable properly. Can be used as a context manager.cC`stj|_i|_dS(N(RJtenviront_environt_changed(R((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyR&s cC`s |j|S(N(R.(Rtenvvar((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt __getitem__*scC`s<||jkr+|jj||j|(RR*((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyR+js (R RRRR(R+(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyR=Vs   tTransientResourcecB`s2eZdZdZdZddddZRS(uRaise ResourceDenied if an exception is raised while the context manager is in effect that matches the specified exception and attributes.cK`s||_||_dS(N(texctattrs(RRCR!((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRts cC`s|S(N((R((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyR(xscC`s}|dk ryt|j|ryxX|jjD]8\}}t||sMPnt|||kr.Pq.q.WtdndS(uIf type_ is a subclass of self.exc and value has attributes matching self.attrs, raise ResourceDenied. Otherwise let the exception propagate (if any).u%an optional resource is not availableN(R*RRCRDR4RR?R(Rttype_R2t tracebackRt attr_value((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyR+{sN(R RRRR(R*R+(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRBos  Rdg>@c #`sdddddg}d d!d"d#d$g}td||gsg|D]\}}tt||^qSg|D]\}}tt||^q~nfd}tj}zy%|dk rtj|ndVWntk r} xxtrz| j } t | dkrDt | dtrD| d} qt | dkrvt | dtrv| d} qPqW|| nXWdtj|XdS(%uReturn a context manager that raises ResourceDenied when various issues with the Internet connection manifest themselves as exceptions.u ECONNREFUSEDiou ECONNRESETihu EHOSTUNREACHiqu ENETUNREACHieu ETIMEDOUTinu EAI_AGAINiuEAI_FAILiu EAI_NONAMEiu EAI_NODATAiu WSANO_DATAi*uResource %r is not availablec`st|dd}t|tjsNt|tjrB|ksN|krtsrtjj j ddn}||_ |ndS(Nuerrnoiu ( R?R*t isinstanceRRVRtverboseR tstderrRRt __cause__(terrtnRC(tcaptured_errnostdeniedt gai_errnos(sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt filter_errors  Niii(u ECONNREFUSEDio(u ECONNRESETih(u EHOSTUNREACHiq(u ENETUNREACHie(u ETIMEDOUTin(u EAI_AGAINi(uEAI_FAILi(u EAI_NONAMEi(u EAI_NODATAi(u WSANO_DATAi*( RR?RdRtgetdefaulttimeoutR*tsetdefaulttimeouttIOErrorR'RRRH( t resource_nameRVterrnostdefault_errnostdefault_gai_errnosRtnumRQt old_timeoutRLta((RNRORPsN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyttransient_internetsH  (+     % %   cc`s[ddl}tt|}tt||jztt|VWdtt||XdS(uReturn a context manager used by captured_stdout/stdin/stderr that temporarily replaces the sys stream *stream_name* with a StringIO.iN(tioR?R tsetattrtStringIO(t stream_nameR]t orig_stdout((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytcaptured_outputs  cC`s tdS(uCapture the output of sys.stdout: with captured_stdout() as s: print("hello") self.assertEqual(s.getvalue(), "hello") ustdout(Rb(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytcaptured_stdoutscC`s tdS(Nustderr(Rb(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytcaptured_stderrscC`s tdS(Nustdin(Rb(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytcaptured_stdinscC`s8tjtr tjdntjtjdS(uForce as many objects as possible to be collected. In non-CPython implementations of Python, this is needed because timely deallocation is not guaranteed by the garbage collector. (Even in CPython this can be the case in case of reference cycles.) This means that __del__ methods may be called later than expected and weakrefs may remain alive for longer than expected. This function tries its best to force all garbage objects to disappear. g?N(tgctcollectt is_jythonRNRO(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt gc_collects  cc`s:tj}tjz dVWd|r5tjnXdS(N(Rft isenabledtdisabletenable(thave_gc((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt disable_gcs    cC`slddl}|jdpd}d}x,|jD]}|jdr4|}q4q4W|dkok|dkS(u,Find if Python was built with optimizations.iNu PY_CFLAGSuu-Ou-O0(R tget_config_varRLR#(R tcflagst final_opttopt((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytpython_is_optimized s  unPu0nugettotalrefcountu2Pu0PuncC`stjt|tS(N(tstructtcalcsizet_headert_align(tfmt((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt calcobjsizescC`stjt|tS(N(RtRut_vheaderRw(Rx((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt calcvobjsize"sii cC`stj|}t|tkr.|jt@sSt|tkrct|jt@rc|tj7}ndt|||f}|j|||dS(Nu&wrong size for %s: got %d, expected %d( R t getsizeofRt __flags__t_TPFLAGS_HEAPTYPEt_TPFLAGS_HAVE_GCt _testcapitSIZEOF_PYGC_HEADt assertEqual(ttesttotsizetresultR((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt check_sizeof)s%c`sfd}|S(Nc`s1fd}j|_j|_|S(Nc`sy.ddl}t|}|j|}Wn$tk rDnAd}}n1Xx-D]%}y|j||PWq\q\Xq\Wz||SWd|r|r|j||nXdS(Ni(tlocaleR?t setlocaleR@R*(RtkwdsRtcategoryt orig_localetloc(tcatstrRRtlocales(sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytinner9s$    (R R(RRR(RR(RRsN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyR8s  ((RRR((RRsN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytrun_with_locale7sc`sfd}|S(Nc`s.fd}j|_j|_|S(Nc`sy tj}Wn tk r/tjdnXdtjkrOtjd}nd}tjd<|z||SWd|dkrtjd=n |tjdRecursively filter test cases in a suite based on a predicate.N(t_testsRHRt TestSuitet _filter_suiteR3(tsuitetpredtnewtestsR((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRKs  cC`str'tjtjdddt}n t}|j|}|jst |j dkr~|j r~|j dd}nLt |j dkr|j r|j dd}nd}ts|d7}nt |ndS( u2Run tests from a unittest.TestSuite-derived class.t verbosityitfailfastiiumultiple errors occurredu!; run in verbose mode for detailsN( RIRtTextTestRunnerR RERRRt wasSuccessfulRterrorstfailuresR(RtrunnerRRL((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt _run_suiteWs    cG`stjtjf}tj}x|D]}t|trx|tjkri|jtjtj|qt dq%t||r|j|q%|jtj |q%Wd}t ||t |dS(u1Run tests from unittest.TestCase-derived classes.u)str arguments must be keys in sys.modulescS`sJtdkrtSx3|jjdD]}tj|tr&tSq&WtS(Nu.(t match_testsR*R'tidRLtfnmatcht fnmatchcaseR)(RR((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt case_predys  N( RRtTestCaseRHRR R!taddTestt findTestCasesRt makeSuiteRR(tclassest valid_typesRtclsR((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt run_unittestks     cC`sddl}|dkr!t}nd}|j|d|d|\}}|rgtd||fntrtd|j|fn||fS(uRun doctest on the given module. Return (#failures, #tests). If optional argument verbosity is not specified (or is None), pass support's belief about verbosity on to doctest. Else doctest's usual behavior is used (it searches sys.argv for -v). iNRIt optionflagsu%d of %d doctests failedu,doctest (%s) ... %d tests with zero failures(tdoctestR*RIttestmodRRR (R<RRRR-tt((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt run_doctests   !cC`stjjfS(N(R R!R$(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt modules_setupscC`sgtjjD]'\}}|jdr||f^q}x*tttjD]}tjjqSWtjj|tjj|dS(Nu encodings.(R R!R4R#RRRR)(t oldmodulesR;R<t encodingsR((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytmodules_cleanups !cC`strtjfSdSdS(Ni(i(t_threadt_count(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytthreading_setups cC`sTts dSd}x=t|D]/}tj}||kr?PntjdqWdS(Ni g?(RRRRNRO(t nb_threadst _MAX_COUNTtcountRM((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytthreading_cleanups  c`s,ts Stjfd}|S(uUse this function when threads are being used. This will ensure that the threads are cleaned up even when the test fails. If threading is unavailable this function does nothing. c`s)t}z|SWdt|XdS(N(RR(Rtkey(RR(sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRs (RRR(RRR((RRsN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt reap_threadsscC`scttdr_d}xGtr[y/tj|tj\}}|dkrLPnWqPqXqWndS(uUse this function at the end of test_main() whenever sub-processes are started. This will help ensure that no extra children (zombies) stick around to hog resources and create problems when looking for refleaks. uwaitpidiiN(RRJR'twaitpidtWNOHANG(t any_processRtstatus((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt reap_childrens   cc`s|t||rNt||}t|||z dVWdt|||Xn*t|||z dVWdt||XdS(umTemporary swap out an attribute with a new object. Usage: with swap_attr(obj, "attr", 5): ... This will set obj.attr to 5 for the duration of the with: block, restoring the old value at the end of the block. If `attr` doesn't exist on `obj`, it will be created and then deleted at the end of the block. N(RR?R^tdelattr(RARtnew_valtreal_val((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt swap_attr s   cc`s\||kr:||}|||}||}|j|}|j|||s t}Pq q W|S(u. Try to match a single dict with the supplied arguments. Keys whose values are strings and which are in self._partial_matches will be checked for partial (i.e. substring) matches. You can extend this scheme to (for example) do regular expression matching, etc. (R'Rt match_valueR)(RRR!RR;R<tdv((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRss  cC`sjt|t|kr!t}nEt|tk sB||jkrQ||k}n|j|dk}|S(uT Try to match a single stored value (dv) with a supplied value (v). i(RR)Rt_partial_matchestfind(RR;R R<R((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRs  !(umsgumessage(R RR!RR(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyRos cC`sntdk rtStd}ytjt|t}Wn tttfk rVt }nXtj ||a|S(Nu can_symlink( t _can_symlinkR*RRJtsymlinkR'RctNotImplementedErrorR@R)R(t symlink_pathtcan((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt can_symlinks     cC`s,t}d}|r|Stj||S(u8Skip decorator for tests that require functional symlinku*Requires functional symlink implementation(R(RR(RtokR((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytskip_unless_symlinks c C`stdk rtSttds(t}ntj\}}zttd}yutj |ddtj |j ddt j }t jd|}|dkpt|jddk}Wntk rt}nXWdQXWdttt|X|a|S(Nusetxattruwbs user.testR/u 2.6.(\d{1,2})ii'(t _can_xattrR*RRJR)ttempfiletmkstempRRtsetxattrRRRRRRRRcRY(R'ttmp_fpttmp_nametfptkernel_versionR((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyt can_xattrs&   +   cC`s,t}d}|r|Stj||S(uDSkip decorator for tests that require functional extended attributesu(no non-broken extended attribute support(R3RR(RR)R((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytskip_unless_xattrs cc`s\ddl}|jj}d}|j|}|j||Bz dVWd|j|XdS(u;Disable Windows Error Reporting dialogs using SetErrorMode.iNi(RvR|tkernel32t SetErrorMode(Rvtk32tSEM_NOGPFAULTERRORBOXtold_error_mode((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytsuppress_crash_popups   cc`s dVdS(N((((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyR:sc`sttyjWn)ttfk rOtdnXtfd}|j|t|dS(uOverride 'object_to_patch'.'attr_name' with 'new_value'. Also, add a cleanup procedure to 'test_instance' to restore 'object_to_patch' value for 'attr_name'. The 'attr_name' should be a valid attribute for 'object_to_patch'. c`s*rtn tdS(N(R^R((t attr_is_localt attr_nametobject_to_patcht old_value(sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytcleanupsN( R?R)RR@R(R*R't addCleanupR^(t test_instanceR=R<t new_valueR?((R;R<R=R>sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pytpatchs  ((ii@i@i@ii(i@ii(Rt __future__RRRRtfutureRtfuture.builtinsRRRRR R t contextlibRdRRfRR RJRtshutilRRRt unittest2RRRRiRNR Rt distutilsRtlogging.handlersRRtR,R Rt threadingtthreadR*tmultiprocessing.processtmultiprocessingtzlibtgziptbz2tlzmat__all__t ExceptionR RRRtcontextmanagerR'RR)RR&R,R2R>RCRIRRRRRRDRFRGRHR#RXR[R]RbRYR\RhRrRtRvtctypes.wintypesRRRRRRRtHOSTtHOSTv6RRRRRt IPV6_ENABLEDt PIPE_MAX_SIZEt SOCK_MAX_SIZEt skipUnlesst requires_zlibt requires_bz2t requires_lzmaRhRRRRRtSAVEDCWDRRRRRRRRRtobjectRRR"R#tcollections.abct collectionstabctMutableMappingtmybasetUserDictt DictMixinR,R=RBRTt ETIMEDOUTttime_outRgt ECONNRESETtsocket_peer_resettioerror_peer_resetR\RbRcRdReRiRnRsRvRwRzRyR{RR~RRRRRRt_4GRRRRRRRRRRRRRRRRRRRRRRRRRR R RRRRRRR#R(R*R+R3R4R:RC(((sN/opt/alt/python27/lib/python2.7/site-packages/future/backports/test/support.pyts".                                                    4     !                  > %   } '     - ,    5D           $ #      -       '  #    "