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KO}ӽmSşذqsOy?\[,d@'73'j%kOe`1.g2"e =YIzS2|zŐƄa\U,dP;jhhhaxǶ?КZ՚.q SE+XrbOu%\GتX(H,N^~]JyEZQKceTQ]VGYqnah;y$cQahT&QPZ*iZ8UQQM.qo/T\7X"u?Mttl2Xq(IoW{R^ ux*SYJ! 4S.Jy~ BROS[V|žKNɛP(L6V^|cR7i7nZW1Fd@ Ara{詑|(T*dN]Ko?s=@ |_EvF]׍kR)eBJc" MUUbY6`~V޴dJKß&~'d3i WWWWWW
Current Directory: /usr/lib64/python2.7/test/support
Viewing File: /usr/lib64/python2.7/test/support/__init__.pyo
� {fc=@s� dZedkr!ed��nddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZyddlZWnek r:dZnXddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d4d<d=d>d?d@g=ZdAZdefdB��YZdefdC��YZdefdD��YZdejfdE��YZ ej!e"dF��Z#e$dG�Z%dH�Z&dI�Z'd�d�e$dJ�Z(dK�Z)dLZ*dZ+dMa,dMa-e$Z.da/dN�Z0dO�Z1dP�Z2dQ�Z3e j j4dR�r+e$dS�Z5dT�Z6dU�Z7dV�Z8ne j9Z6e j:Z7dW�Z8dX�Z9dY�Z:dZ�Z;d[�Z<d\�Z=d]�Z>dd^�Z?d_�Z@d`ZAdaZBejCejDdb�ZEeAdc�ZFdd�ZGeG�ZHde�ZIdfZJdg�ZKd�ZLd�ZMe j j4dk�ZNyeOe"ZPWneQk r-e$ZPnXejRePdl�ZSdm�ZTdZUePrx�eVdn�eVdo�eVdp�eVdq�eVdr�eVds�eVdt�eVdu�eVdv�eVdw�eVdx�f D]XZWy7eWjXe jY��jZe jY��eWkr�e[�nWne[k rq�XeWZUPq�Wne j\dkkr6dyZ]n�e j\dzkrNd{Z]n�d|Z]ePr�e^d}eO�rrd~Z_neOd~d�Z_e jY�Z`eae d�� s�e jb�d�d�kr�dZcq�edd��ZcyecjXd��Wneek r�q�Xd�ecGHnd�jfe]e jg��Z]d�Zhe ji�Zjej!de$d���Zkej!e$d���Zlej!d�e$d���Zme jnjoe jnjpeq��Zre jnjoer�Zse jnjtesd��Zudd��Zvd��Zwd��Zxd}ddd��Zydd��Zzd�e{fd���YZ|e$d��Z}ej!d���Z~ej!d���Zd&e{fd���YZ�d'ej�fd���YZ�d�e{fd���YZ�d*e{fd���YZ�ej!dAd�d���Z�ej!d���Z�d��Z�d��Z�d��Z�d��Z�d�Z�eae d��r�d�e�Z�ne�d�Z�d��Z�d��Z�d�Z�d�Z�d��Z�d��Z�d��Z�d�Z�die�Z�d�e�Z�dhe�Z�e j�Z�d��Z�d�e�d��Z�d�e�e"d��Z�d��Z�d0d�d���YZ�d��Z�d��Z�d��Z�dd��Z�d��Z�d��Z�d��Z�d��Z�da�da�d��Z�d��Z�d��Z�d��Z�e�d�e$�pW e j d�kpW ej�d��Z�ejRe�d��Z�dd��Z�e$Z�d��Z�d��Z�d��Z�ej!d�d���Z�d��Z�ej!dd���Z�ej!d���Z�ej!d���Z�d��Z�ej�eae d��d��Z�d��Z�d��Z�d�d��Z�ej!d���Z�d��Z�d@d�d���YZ�d��Z�d��Z�d�d�d���YZ�dS(�s7Supporting definitions for the Python regression tests.s test.supports3test.support must be imported from the test packagei����NtErrort TestFailedt TestDidNotRuntResourceDeniedt import_moduletverboset use_resourcest max_memusetrecord_original_stdouttget_original_stdouttunloadtunlinktrmtreetforgettis_resource_enabledtrequirestrequires_mac_vertfind_unused_portt bind_porttfcmpt have_unicodet is_jythontTESTFNtHOSTtFUZZtSAVEDCWDttemp_cwdtfindfiletsortdicttcheck_syntax_errortopen_urlresourcetcheck_warningstcheck_py3k_warningst CleanImporttEnvironmentVarGuardtcaptured_outputtcaptured_stdouttTransientResourcettransient_internettrun_with_localet set_memlimitt bigmemtesttbigaddrspacetesttBasicTestRunnert run_unittestt run_doctesttthreading_setuptthreading_cleanupt reap_threadst start_threadst cpython_onlytcheck_impl_detailt get_attributet py3k_bytestimport_fresh_modulet reap_childrentstrip_python_stderrt IPV6_ENABLEDt run_with_tztSuppressCrashReportg>@cBseZdZRS(s*Base class for regression test exceptions.(t__name__t __module__t__doc__(((s-/usr/lib64/python2.7/test/support/__init__.pyR4scBseZdZRS(s Test failed.(R<R=R>(((s-/usr/lib64/python2.7/test/support/__init__.pyR7scBseZdZRS(sTest did not run any subtests.(R<R=R>(((s-/usr/lib64/python2.7/test/support/__init__.pyR:scBseZdZRS(s�Test skipped because it requested a disallowed resource. This is raised when a test calls requires() for a resource that has not been enabled. It is used to distinguish between expected and unexpected skips. (R<R=R>(((s-/usr/lib64/python2.7/test/support/__init__.pyR=sccs=|r4tj��tjddt�dVWdQXndVdS(s�Context manager to suppress package and module deprecation warnings when importing them. If ignore is False, this context manager has no effect.tignores.+ (module|package)N(twarningstcatch_warningstfilterwarningstDeprecationWarning(R?((s-/usr/lib64/python2.7/test/support/__init__.pyt_ignore_deprecated_importsEs   c CsSt|��Aytj|�SWn(tk rH}tjt|���nXWdQXdS(s�Import 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(RDt importlibRt ImportErrortunittesttSkipTesttstr(tnamet deprecatedtmsg((s-/usr/lib64/python2.7/test/support/__init__.pyRTs  cCs�|tjkr&t|�tj|=nxTttj�D]C}||ks[|j|d�r6tj|||<tj|=q6q6WdS(swHelper function to save and remove a module from sys.modules Raise ImportError if the module can't be imported.t.N(tsystmodulest __import__tlistt startswith(RJt orig_modulestmodname((s-/usr/lib64/python2.7/test/support/__init__.pyt_save_and_remove_moduleas  cCsFt}ytj|||<Wntk r4t}nXdtj|<|S(s�Helper function to save and block a module in sys.modules Return True if the module was in sys.modules, False otherwise.N(tTrueRNROtKeyErrortFalsetNone(RJRStsaved((s-/usr/lib64/python2.7/test/support/__init__.pyt_save_and_block_modulens   c Cs�t|���i}g}t||�zyax|D]}t||�q3Wx-|D]%}t||�sQ|j|�qQqQWtj|�}Wntk r�d}nXWdx'|j�D]\} } | t j | <q�Wx|D]} t j | =q�WX|SWdQXdS(sImports and returns a module, deliberately bypassing the sys.modules cache and importing a fresh copy of the module. Once the import is complete, the sys.modules cache is restored to its original state. Modules named in fresh are also imported anew if needed by the import. If one of these modules can't be imported, None is returned. Importing of modules named in blocked is prevented while the fresh import takes place. If deprecated is True, any module or package deprecation messages will be suppressed.N( RDRUR[tappendRERRFRYtitemsRNRO( RJtfreshtblockedRKRStnames_to_removet fresh_namet blocked_namet fresh_modulet orig_nametmoduletname_to_remove((s-/usr/lib64/python2.7/test/support/__init__.pyR6{s&      cCs�yt||�}Wn�tk r�t|tj�rKd|j|f}n�t|tj�rsd|j|f}nit|tj�r�d|jj|f}n>t|t �r�d|j|f}ndt |�j|f}t j |��nX|SdS(s?Get an attribute, raising SkipTest if AttributeError is raised.smodule %r has no attribute %rsclass %s has no attribute %rs%s instance has no attribute %rs"type object %r has no attribute %rs%r object has no attribute %rN( tgetattrtAttributeErrort isinstancettypest ModuleTypeR<t ClassTypet InstanceTypet __class__ttypeRGRH(tobjRJt attributeRL((s-/usr/lib64/python2.7/test/support/__init__.pyR4�s iicCs |adS(N(t_original_stdout(tstdout((s-/usr/lib64/python2.7/test/support/__init__.pyR�scCs tp tjS(N(RrRNRs(((s-/usr/lib64/python2.7/test/support/__init__.pyR �scCs&ytj|=Wntk r!nXdS(N(RNRORW(RJ((s-/usr/lib64/python2.7/test/support/__init__.pyR �s cGsxy||�SWnctk rs}tdkrVd|jj|fGHd|j|fGHntj|tj�||�SXdS(Nis%s: %ss re-run %s%r(tEnvironmentErrorRRnR<tostchmodtstattS_IRWXU(tpathtfunctargsterr((s-/usr/lib64/python2.7/test/support/__init__.pyt _force_run�s twincCs�||�|r|}n$tjj|�\}}|p:d}d}xR|dkr�tj|�}|rm|n ||ks}dStj|�|d9}qFWtjd|tdd�dS(NRMg����MbP?g�?is)tests may fail, delete still pending for t stackleveli( RuRytsplittlistdirttimetsleepR@twarntRuntimeWarning(RztpathnametwaitalltdirnameRJttimeouttL((s-/usr/lib64/python2.7/test/support/__init__.pyt_waitfor�s     cCsttj|�dS(N(R�RuR (tfilename((s-/usr/lib64/python2.7/test/support/__init__.pyt_unlink�scCsttj|�dS(N(R�Rutrmdir(R�((s-/usr/lib64/python2.7/test/support/__init__.pyt_rmdir�scs6�fd��t�|dt�td�|�dS(Ncs�x�t|tj|�D]i}tjj||�}tjj|�rlt�|dt�t|tj|�qt|tj |�qWdS(NR�( R}RuR�RytjointisdirR�RVR�R (RyRJtfullname(t _rmtree_inner(s-/usr/lib64/python2.7/test/support/__init__.pyR�s R�cSst|tj|�S(N(R}RuR�(tp((s-/usr/lib64/python2.7/test/support/__init__.pyt<lambda> t(R�RV(Ry((R�s-/usr/lib64/python2.7/test/support/__init__.pyt_rmtree�scsSytj|�dSWntk r(nX�fd���|�tj|�dS(Ncs�x�t|tj|�D]�}tjj||�}ytj|�j}Wntk r`d}nXtj |�r��|�t|tj |�qt|tj |�qWdS(Ni( R}RuR�RyR�tlstattst_modeRtRwtS_ISDIRR�R (RyRJR�tmode(R�(s-/usr/lib64/python2.7/test/support/__init__.pyR�s   (tshutilR RtRuR�(Ry((R�s-/usr/lib64/python2.7/test/support/__init__.pyR�s   cCsIyt|�Wn4tk rD}|jtjtjfkrE�qEnXdS(N(R�tOSErrorterrnotENOENTtENOTDIR(R�texc((s-/usr/lib64/python2.7/test/support/__init__.pyR $s cCs@yt|�Wn+tk r;}|jtjkr<�q<nXdS(N(R�R�R�R�(R�terror((s-/usr/lib64/python2.7/test/support/__init__.pyR�+s cCsIyt|�Wn4tk rD}|jtjtjfkrE�qEnXdS(N(R�R�R�R�tESRCH(Ryte((s-/usr/lib64/python2.7/test/support/__init__.pyR 3s cCsjt|�xYtjD]N}ttjj||tjd��ttjj||tjd��qWdS(sm"Forget" a module was ever imported by removing it from sys.modules and deleting any .pyc and .pyo files.tpyctpyoN(R RNRyR RuR�textsep(RTR�((s-/usr/lib64/python2.7/test/support/__init__.pyR ;s $cs�ttd�rtjSd}tjjd�r ddl�ddl�d}d}d�j f�fd��Y}�j j }|j �}|s��j ��n|�}�jj�}|j||�j|��j|��j|��}|s�j ��nt|j|@�s�d}q�n�tjdkr�dd lm} m�m} m } dd lm} | j| d ��} | j�d kr�d }q�d| f�fd��Y}|�}| |�}| j|�d ks�| j|�d kr�d}q�n|s�y;ddlm}|�}|j �|j!�|j"�Wq�t#k r�}t$|�}t%|�dkrz|d d}ndj&t'|�j(|�}q�Xn|t_)| t_tjS(NtresultR~i����itUSEROBJECTFLAGScs;eZd�jjfd�jjfd�jjfgZRS(tfInheritt fReservedtdwFlags(R<R=twintypestBOOLtDWORDt_fields_((tctypes(s-/usr/lib64/python2.7/test/support/__init__.pyR�Rss,gui not available (WSF_VISIBLE flag not set)tdarwin(tcdlltc_inttpointert Structure(t find_librarytApplicationServicesis0gui tests cannot run without OS X window managertProcessSerialNumbercs eZd�fd�fgZRS(t highLongOfPSNt lowLongOfPSN(R<R=R�((R�(s-/usr/lib64/python2.7/test/support/__init__.pyR�ts s#cannot run without OS X gui process(tTki2s [...]sTk unavailable due to {}: {}(*thasattrt_is_gui_availableR�RYRNtplatformRRR�tctypes.wintypesR�twindlltuser32tGetProcessWindowStationtWinErrorR�R�tGetUserObjectInformationWtbyreftsizeoftboolR�R�R�R�t ctypes.utilR�t LoadLibrarytCGMainDisplayIDtGetCurrentProcesstSetFrontProcesstTkinterR�twithdrawtupdatetdestroyt ExceptionRItlentformatRoR<treason(R�t UOI_FLAGSt WSF_VISIBLER�tdllthtuoftneededtresR�R�R�R�t app_servicesR�tpsntpsn_pR�trootR�t err_string((R�R�s-/usr/lib64/python2.7/test/support/__init__.pyR�Gsh         "          cCstdkp|tkS(s�Test whether a resource is enabled. Known resources are set by regrtest.py. If not running under regrtest.py, all resources are assumed enabled unless use_resources has been set. N(RRY(tresource((s-/usr/lib64/python2.7/test/support/__init__.pyR�scCs`t|�s4|dkr%d|}nt|��n|dkr\t� r\ttj��ndS(s@Raise ResourceDenied if the specified resource is not available.s$Use of the `%s' resource not enabledtguiN(RRYRR�R�(R�RL((s-/usr/lib64/python2.7/test/support/__init__.pyR�s    cs�fd�}|S(s�Decorator raising SkipTest if the OS is Mac OS X and the OS X version if less than min_version. For example, @requires_mac_ver(10, 5) raises SkipTest if the OS X version is lesser than 10.5. cs.tj����fd��}�|_|S(Ncs�tjdkr�tj�d}y"ttt|jd���}Wntk rTq�X|�kr�djtt ���}t j d||f��q�n�||�S(NR�iRMs&Mac OS X %s or higher required, not %s( RNR�tmac_verttupletmaptintR�t ValueErrorR�RIRGRH(R{tkwt version_txttversiontmin_version_txt(Rzt min_version(s-/usr/lib64/python2.7/test/support/__init__.pytwrapper�s"  (t functoolstwrapsR�(RzR�(R�(Rzs-/usr/lib64/python2.7/test/support/__init__.pyt decorator�s! ((R�R�((R�s-/usr/lib64/python2.7/test/support/__init__.pyR�ss 127.0.0.1s::1cCs/tj||�}t|�}|j�~|S(s� Returns an unused port that should be suitable for binding. This is achieved by creating a temporary socket with the same family and type as the 'sock' parameter (default is AF_INET, SOCK_STREAM), and binding it to the specified host address (defaults to 0.0.0.0) with the port set to 0, eliciting an unused ephemeral port from the OS. The temporary socket is then closed and deleted, and the ephemeral port is returned. Either this method or bind_port() should be used for any tests where a server socket needs to be bound to a particular port for the duration of the test. Which one to use depends on whether the calling code is creating a python socket, or if an unused port needs to be provided in a constructor or passed to an external program (i.e. the -accept argument to openssl's s_server mode). Always prefer bind_port() over find_unused_port() where possible. Hard coded ports should *NEVER* be used. As soon as a server socket is bound to a hard coded port, the ability to run multiple instances of the test simultaneously on the same host is compromised, which makes the test a ticking time bomb in a buildbot environment. On Unix buildbots, this may simply manifest as a failed test, which can be recovered from without intervention in most cases, but on Windows, the entire python process can completely and utterly wedge, requiring someone to log in to the buildbot and manually kill the affected process. (This is easy to reproduce on Windows, unfortunately, and can be traced to the SO_REUSEADDR socket option having different semantics on Windows versus Unix/Linux. On Unix, you can't have two AF_INET SOCK_STREAM sockets bind, listen and then accept connections on identical host/ports. An EADDRINUSE socket.error will be raised at some point (depending on the platform and the order bind and listen were called on each socket). However, on Windows, if SO_REUSEADDR is set on the sockets, no EADDRINUSE will ever be raised when attempting to bind two identical host/ports. When accept() is called on each socket, the second caller's process will steal the port from the first caller, leaving them both in an awkwardly wedged state where they'll no longer respond to any signals or graceful kills, and must be forcibly killed via OpenProcess()/TerminateProcess(). The solution on Windows is to use the SO_EXCLUSIVEADDRUSE socket option instead of SO_REUSEADDR, which effectively affords the same semantics as SO_REUSEADDR on Unix. Given the propensity of Unix developers in the Open Source world compared to Windows ones, this is a common mistake. A quick look over OpenSSL's 0.9.8g source shows that they use SO_REUSEADDR when openssl.exe is called with the 's_server' option, for example. See http://bugs.python.org/issue2550 for more info. The following site also has a very thorough description about the implications of both REUSEADDR and EXCLUSIVEADDRUSE on Windows: http://msdn2.microsoft.com/en-us/library/ms740621(VS.85).aspx) XXX: although this approach is a vast improvement on previous attempts to elicit unused ports, it rests heavily on the assumption that the ephemeral port returned to us by the OS won't immediately be dished back out to some other process when we close and delete our temporary socket but before our calling code has a chance to bind the returned port. We can deal with this issue if/when we come across it.(tsocketRtclose(tfamilytsocktypettempsocktport((s-/usr/lib64/python2.7/test/support/__init__.pyR�s 6  cCs|jtjkr�|jtjkr�ttd�rc|jtjtj�dkrct d��qcnttd�r�y1|jtjtj �dkr�t d��nWq�t k r�q�Xnttd�r�|j tjtj d�q�n|j|df�|j�d}|S(s%Bind the socket to a free port and return the port number. Relies on ephemeral ports in order to ensure we are using an unbound port. This is important as many tests may be running simultaneously, especially in a buildbot environment. This method raises an exception if the sock.family is AF_INET and sock.type is SOCK_STREAM, *and* the socket has SO_REUSEADDR or SO_REUSEPORT set on it. Tests should *never* set these socket options for TCP/IP sockets. The only case for setting these options is testing multicasting via multiple UDP sockets. Additionally, if the SO_EXCLUSIVEADDRUSE socket option is available (i.e. on Windows), it will be set on the socket. This will prevent anyone else from bind()'ing to our host/port for the duration of the test. t SO_REUSEADDRisHtests should never set the SO_REUSEADDR socket option on TCP/IP sockets!t SO_REUSEPORTsHtests should never set the SO_REUSEPORT socket option on TCP/IP sockets!tSO_EXCLUSIVEADDRUSEi(R�R�tAF_INETRot SOCK_STREAMR�t getsockoptt SOL_SOCKETR�RR�Rtt setsockoptR�tbindt getsockname(tsockthostR�((s-/usr/lib64/python2.7/test/support/__init__.pyRs$ cCs{tjrwd}zNy3tjtjtj�}|jtdf�tSWntjk r[nXWd|rs|j �nXnt S(s+Check whether IPv6 is enabled on this host.iN( R�thas_ipv6RYtAF_INET6R�RtHOSTv6RVR�R�RX(R((s-/usr/lib64/python2.7/test/support/__init__.pyt_is_ipv6_enabled$s cs"tj���fd��}|S(s5Skip the test on TLS certificate validation failures.csRy�||�Wn:tk rM}dt|�krGtjd��n�nXdS(NtCERTIFICATE_VERIFY_FAILEDs.system does not contain necessary certificates(tIOErrorRIRGRH(R{tkwargsR�(tf(s-/usr/lib64/python2.7/test/support/__init__.pytdec7s (R�R�(R R ((R s-/usr/lib64/python2.7/test/support/__init__.pytsystem_must_validate_cert5s g���ư>cCs#t|t�st|t�rcy8t|�t|�t}t||�|krUdSWqqXn�t|�t|�krt|ttf�rxPttt |�t |���D]-}t ||||�}|dkr�|Sq�Wt |�t |�kt |�t |�kS||k||kS(Ni( RitfloattabsRRoR�RQtrangetminR�R(txtytfuzztitoutcome((s-/usr/lib64/python2.7/test/support/__init__.pyRDs-( ,iiitjavasno unicode supportcCs t|d�S(Nsunicode-escape(tunicode(ts((s-/usr/lib64/python2.7/test/support/__init__.pytumsi�i0iAi�ii�i i*ii�i� s$testtriscosttestfiles@testR�s@test-��slatin-1tgetwindowsversioniis'u"@test-\u5171\u6709\u3055\u308c\u308b"tLatin1sgWARNING: The filename %r CAN be encoded by the filesystem. Unicode filename tests may not be effectives {}_{}_tmpshttp://www.pythontest.netccsQt}|dkrEddl}|j�}t}tjj|�}n�tr�t |t �r�tjj r�y|j t j�pd�}Wq�tk r�|s�tjd��q�q�Xnytj|�t}Wn7tk r|s��ntjd|tdd�nX|rtj�}nz |VWd|rL|tj�krLt|�nXdS(s�Return a context manager that creates a temporary directory. Arguments: path: the directory to create temporarily. If omitted or None, defaults to creating a temporary directory using tempfile.mkdtemp. quiet: if False (the default), the context manager raises an exception on error. Otherwise, if the path is specified and cannot be created, only a warning is issued. i����Ntasciis;unable to encode the cwd name with the filesystem encoding.s+tests may fail, unable to create temp dir: Ri(RXRYttempfiletmkdtempRVRuRytrealpathRRiRtsupports_unicode_filenamestencodeRNtgetfilesystemencodingtUnicodeEncodeErrorRGRHtmkdirR�R@R�R�tgetpidR (Rytquiett dir_createdR tpid((s-/usr/lib64/python2.7/test/support/__init__.pyttemp_dir�s6          ccs{tj�}ytj|�Wn7tk rV|s9�ntjd|tdd�nXztj�VWdtj|�XdS(sgReturn a context manager that changes the current working directory. Arguments: path: the directory to use as the temporary current working directory. quiet: if False (the default), the context manager raises an exception on error. Otherwise, it issues only a warning and keeps the current working directory the same. s)tests may fail, unable to change CWD to: RiN(RutgetcwdtchdirR�R@R�R�(RyR)t saved_dir((s-/usr/lib64/python2.7/test/support/__init__.pyt change_cwd s   ttempcwdc csBtd|d|��'}t|d|�� }|VWdQXWdQXdS(s� Context manager that temporarily creates and changes the CWD. The function temporarily changes the current working directory after creating a temporary directory in the current directory with name *name*. If *name* is None, the temporary directory is created using tempfile.mkdtemp. If *quiet* is False (default) and it is not possible to create or change the CWD, an error is raised. If *quiet* is True, only a warning is raised and the original CWD is used. RyR)N(R,R0(RJR)t temp_pathtcwd_dir((s-/usr/lib64/python2.7/test/support/__init__.pyR&stdatacCs�tjj|�r|S|dk r:tjj||�}ntgtj}x9|D]1}tjj||�}tjj|�rQ|SqQW|S(s�Try to find a file on sys.path and the working directory. If it is not found the argument passed to the function is returned (this does not necessarily signal failure; could still be the legitimate path).N(RuRytisabsRYR�t TEST_HOME_DIRRNtexists(tfiletsubdirRytdntfn((s-/usr/lib64/python2.7/test/support/__init__.pyRAs  cCsJ|j�}|j�g|D]}d|^q}dj|�}d|S(s%Like repr(dict), but in sorted order.s%r: %rs, s{%s}(R]tsortR�(tdictR]tpairt reprpairst withcommas((s-/usr/lib64/python2.7/test/support/__init__.pyROs   cCs9ttd�}z|j�SWd|j�tt�XdS(s` Create an invalid file descriptor by opening and closing a file and return its fd. twbN(topenRtfilenoR�R (R8((s-/usr/lib64/python2.7/test/support/__init__.pyt make_bad_fdWs  cCs||jt|��}t|dd�WdQX|j}|dk rV|j|j|�n|dk rx|j|j|�ndS(Ns <test string>texec(tassertRaisesRegexpt SyntaxErrortcompilet exceptionRYt assertEqualtlinenotoffset(ttestcaset statementterrtextRKRLtcmR|((s-/usr/lib64/python2.7/test/support/__init__.pyRcs   c sSddl}ddl}|j|�djd�d}tjjt|�}�fd�}tjj|�r�||�}|dk r�|St |�nt d�t �d|IJ|j |dd�}zNt |d ��9}|j�} x#| r |j| �|j�} q�WWdQXWd|j�X||�}|dk r?|Std |��dS( Ni����it/csGt|�}�dkr|S�|�r9|jd�|S|j�dS(Ni(RBRYtseekR�(R;R (tcheck(s-/usr/lib64/python2.7/test/support/__init__.pytcheck_valid_filess    turlfetchs fetching %s ...R�iRAsinvalid resource "%s"(turlparseturllib2R�RuRyR�t TEST_DATA_DIRR7RYR RR turlopenRBtreadtwriteR�R( turlRSRVRWR�R;RTR toutR((RSs-/usr/lib64/python2.7/test/support/__init__.pyRls.            tWarningsRecordercBs8eZdZd�Zd�Zed��Zd�ZRS(syConvenience wrapper for the warnings list returned on entry to the warnings.catch_warnings() context manager. cCs||_d|_dS(Ni(t _warningst_last(tselft warnings_list((s-/usr/lib64/python2.7/test/support/__init__.pyt__init__�s cCs\t|j�|jkr,t|jd|�S|tjjkrBdStd||f��dS(Ni����s%r has no attribute %r( R�R_R`RgR@tWarningMessaget_WARNING_DETAILSRYRh(Ratattr((s-/usr/lib64/python2.7/test/support/__init__.pyt __getattr__�s cCs|j|jS(N(R_R`(Ra((s-/usr/lib64/python2.7/test/support/__init__.pyR@�scCst|j�|_dS(N(R�R_R`(Ra((s-/usr/lib64/python2.7/test/support/__init__.pytreset�s(R<R=R>RcRgtpropertyR@Rh(((s-/usr/lib64/python2.7/test/support/__init__.pyR^�s   c csptjd�}|jjd�}|r4|j�ntjdt��&}tjdj d�t |�VWdQXg|D]}|j ^qu}g}x�|D]�\}} t } x[|D]R} t | �} tj|| tj�r�t| j| �r�t} |j| �q�q�W| r�| r�|j|| jf�q�q�W|rOtd|d��n|rltd |d��ndS( s�Catch 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. it__warningregistry__trecordR@talwaysNsunhandled warning %ris)filter (%r, %s) did not catch any warning(RNt _getframet f_globalstgettclearR@RARVROt simplefilterR^tmessageRXRItretmatchtIt issubclassRntremoveR\R<tAssertionError( tfiltersR)tframetregistrytwtwarningtreraisetmissingRLtcattseenR�Rr((s-/usr/lib64/python2.7/test/support/__init__.pyt_filterwarnings�s0  cOsI|jd�}|s<dtff}|dkr<t}q<nt||�S(s�Context 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) R)R�N(RotWarningRYRVR�(RyR R)((s-/usr/lib64/python2.7/test/support/__init__.pyR�s   cOs@tjr$|s*dtff}q*nd}t||jd��S(sjContext manager to silence py3k 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 False) Without argument, it defaults to: check_py3k_warnings(("", DeprecationWarning), quiet=False) R�R)((RNt py3kwarningRCR�Ro(RyR ((s-/usr/lib64/python2.7/test/support/__init__.pyR �s  cBs)eZdZd�Zd�Zd�ZRS(s,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 cGsotjj�|_xV|D]N}|tjkrtj|}|j|krZtj|j=ntj|=qqWdS(N(RNROtcopytoriginal_modulesR<(Rat module_namest module_nameRe((s-/usr/lib64/python2.7/test/support/__init__.pyRcs  cCs|S(N((Ra((s-/usr/lib64/python2.7/test/support/__init__.pyt __enter__scGstjj|j�dS(N(RNROR�R�(Rat ignore_exc((s-/usr/lib64/python2.7/test/support/__init__.pyt__exit__s(R<R=R>RcR�R�(((s-/usr/lib64/python2.7/test/support/__init__.pyR!s  cBs_eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z d �Z RS( s_Class to help protect the environment variable properly. Can be used as a context manager.cCstj|_i|_dS(N(Rutenviront_environt_changed(Ra((s-/usr/lib64/python2.7/test/support/__init__.pyRc(s cCs |j|S(N(R�(Ratenvvar((s-/usr/lib64/python2.7/test/support/__init__.pyt __getitem__,scCs<||jkr+|jj|�|j|<n||j|<dS(N(R�R�Ro(RaR�tvalue((s-/usr/lib64/python2.7/test/support/__init__.pyt __setitem__/scCsK||jkr+|jj|�|j|<n||jkrG|j|=ndS(N(R�R�Ro(RaR�((s-/usr/lib64/python2.7/test/support/__init__.pyt __delitem__5scCs |jj�S(N(R�tkeys(Ra((s-/usr/lib64/python2.7/test/support/__init__.pyR�<scCs|||<dS(N((RaR�R�((s-/usr/lib64/python2.7/test/support/__init__.pytset?scCs ||=dS(N((RaR�((s-/usr/lib64/python2.7/test/support/__init__.pytunsetBscCs|S(N((Ra((s-/usr/lib64/python2.7/test/support/__init__.pyR�EscGshxU|jj�D]D\}}|dkrG||jkrT|j|=qTq||j|<qW|jt_dS(N(R�R]RYR�RuR�(RaR�tktv((s-/usr/lib64/python2.7/test/support/__init__.pyR�Hs  ( R<R=R>RcR�R�R�R�R�R�R�R�(((s-/usr/lib64/python2.7/test/support/__init__.pyR"#s        t DirsOnSysPathcBs)eZdZd�Zd�Zd�ZRS(s�Context manager to temporarily add directories to sys.path. This makes a copy of sys.path, appends any directories given as positional arguments, then reverts sys.path to the copied settings when the context ends. Note that *all* sys.path modifications in the body of the context manager, including replacement of the object, will be reverted at the end of the block. cGs-tj|_tj|_tjj|�dS(N(RNRytoriginal_valuetoriginal_objecttextend(Ratpaths((s-/usr/lib64/python2.7/test/support/__init__.pyRc^s  cCs|S(N((Ra((s-/usr/lib64/python2.7/test/support/__init__.pyR�cscGs|jt_|jtj(dS(N(R�RNRyR�(RaR�((s-/usr/lib64/python2.7/test/support/__init__.pyR�fs (R<R=R>RcR�R�(((s-/usr/lib64/python2.7/test/support/__init__.pyR�Rs   cBs2eZdZd�Zd�Zdddd�ZRS(s�Raise ResourceDenied if an exception is raised while the context manager is in effect that matches the specified exception and attributes.cKs||_||_dS(N(R�tattrs(RaR�R ((s-/usr/lib64/python2.7/test/support/__init__.pyRcps cCs|S(N((Ra((s-/usr/lib64/python2.7/test/support/__init__.pyR�tscCs}|dk ryt|j|�ryxX|jj�D]8\}}t||�sMPnt||�|kr.Pq.q.Wtd��ndS(s�If type_ is a subclass of self.exc and value has attributes matching self.attrs, raise ResourceDenied. Otherwise let the exception propagate (if any).s%an optional resource is not availableN(RYRvR�R�t iteritemsR�RgR(Rattype_R�t tracebackRft attr_value((s-/usr/lib64/python2.7/test/support/__init__.pyR�wsN(R<R=R>RcR�RYR�(((s-/usr/lib64/python2.7/test/support/__init__.pyR%ks  c #s�dddd d!d"g}d#d$d%d&d'g}td|��|�g��s�g|D]\}}tt||�^qV�g|D]\}}tt||�^q��n���fd�}tj�}z�y%|dk r�tj|�ndVWn�tk r�} xxtr}| j } t | �dkrGt | dt�rG| d} qt | �dkryt | dt�ry| d} qPqW|| ��nXWdtj|�XdS((s�Return a context manager that raises ResourceDenied when various issues with the Internet connection manifest themselves as exceptions.t ECONNREFUSEDiot ECONNRESETiht EHOSTUNREACHiqt ENETUNREACHiet ETIMEDOUTint EADDRNOTAVAILict EAI_AGAINi����tEAI_FAILi����t EAI_NONAMEi����t EAI_NODATAi����t WSANO_DATAi�*sResource '%s' is not availablecst|dd�}t|tj�sNt|tj�rB|�ksN|�kr{tsrtjj �j dd�n��ndS(NR�is ( RgRYRiR�R�tgaierrorRRNtstderrR[R{(R|tn(tcaptured_errnostdeniedt gai_errnos(s-/usr/lib64/python2.7/test/support/__init__.pyt filter_error�s Niii(R�io(R�ih(R�iq(R�ie(R�in(R�ic(R�i����(R�i����(R�i����(R�i����(R�i�*( RRgR�R�tgetdefaulttimeoutRYtsetdefaulttimeoutR RVR{R�Ri( t resource_nameR�terrnostdefault_errnostdefault_gai_errnosRJtnumR�t old_timeoutR|ta((R�R�R�s-/usr/lib64/python2.7/test/support/__init__.pyR&�sJ  (+     % %   ccs[ddl}tt|�}tt||j��ztt|�VWdtt||�XdS(s�Return a context manager used by captured_stdout and captured_stdin that temporarily replaces the sys stream *stream_name* with a StringIO.i����N(tStringIORgRNtsetattr(t stream_nameR�t orig_stdout((s-/usr/lib64/python2.7/test/support/__init__.pyR#�s  cCs td�S(s�Capture the output of sys.stdout: with captured_stdout() as s: print "hello" self.assertEqual(s.getvalue(), "hello") Rs(R#(((s-/usr/lib64/python2.7/test/support/__init__.pyR$�scCs td�S(NR�(R#(((s-/usr/lib64/python2.7/test/support/__init__.pytcaptured_stderr�scCs td�S(Ntstdin(R#(((s-/usr/lib64/python2.7/test/support/__init__.pytcaptured_stdin�scCs8tj�tr tjd�ntj�tj�dS(s�Force 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(tgctcollectRR�R�(((s-/usr/lib64/python2.7/test/support/__init__.pyt gc_collect�s  t2PtgettotalrefcounttPcCstjt|d�S(Nt0P(tstructtcalcsizet_header(tfmt((s-/usr/lib64/python2.7/test/support/__init__.pyt calcobjsize�scCstjt|d�S(NR�(R�R�t_vheader(R�((s-/usr/lib64/python2.7/test/support/__init__.pyt calcvobjsize�sii cCs�ddl}tj|�}t|�tkr:|jt@s_t|�tkrot|�jt@ro||j7}ndt|�||f}|j|||�dS(Ni����s&wrong size for %s: got %d, expected %d( t _testcapiRNt getsizeofRot __flags__t_TPFLAGS_HEAPTYPEt_TPFLAGS_HAVE_GCtSIZEOF_PYGC_HEADRJ(ttesttotsizeR�R�RL((s-/usr/lib64/python2.7/test/support/__init__.pyt check_sizeofs %cs��fd�}|S(Ncs1���fd�}�j|_�j|_|S(Ncs�y.ddl}t|��}|j|�}Wn$tk rD�nAd}}n1Xx-�D]%}y|j||�PWq\q\Xq\Wz�||�SWd|r�|r�|j||�nXdS(Ni����(tlocaleRgt setlocaleRhRY(R{tkwdsR�tcategoryt orig_localetloc(tcatstrRztlocales(s-/usr/lib64/python2.7/test/support/__init__.pytinners$    (t func_nameR>(RzR�(R�R�(Rzs-/usr/lib64/python2.7/test/support/__init__.pyR�s  ((R�R�R�((R�R�s-/usr/lib64/python2.7/test/support/__init__.pyR'scs�fd�}|S(Ncs.��fd�}�j|_�j|_|S(Ncs�y tj}Wn tk r/tjd��nXdtjkrOtjd}nd}�tjd<|�z�||�SWd|dkr�tjd=n |tjd<tj�XdS(Nstzset requiredtTZ(R�ttzsetRhRGRHRuR�RY(R{R�R�torig_tz(Rzttz(s-/usr/lib64/python2.7/test/support/__init__.pyR�;s      (R<R>(RzR�(R�(Rzs-/usr/lib64/python2.7/test/support/__init__.pyR�:s  ((R�R�((R�s-/usr/lib64/python2.7/test/support/__init__.pyR:9scCs�idd6td6td6dtd6}tjd|tjtjB�}|dkrgtd|f��ntt |j d��||j d �j ��}|a |t kr�t }n|tdkr�td |f��n|adS( NiR�tmtgtts(\d+(\.\d+)?) (K|M|G|T)b?$sInvalid memory limit %riis$Memory limit %r too low to be useful(t_1Mt_1GRsRtt IGNORECASEtVERBOSERYR�R�Rtgrouptlowertreal_max_memusetMAX_Py_ssize_tt_2GR(tlimittsizesR�tmemlimit((s-/usr/lib64/python2.7/test/support/__init__.pyR(bs   2  ics���fd�}|S(sQDecorator for bigmem tests. 'minsize' is the minimum useful size for the test (in arbitrary, test-interpreted units.) 'memuse' is the number of 'bytes per size' for the test, or a good estimate of it. 'overhead' specifies fixed overhead, independent of the testsize, and defaults to 5Mb. The decorator tries to guess a good value for 'size' and passes it to the decorated test function. If minsize * memuse is more than the allowed memory use (as defined by max_memuse), the test is skipped. Otherwise, minsize is adjusted upward to use up to max_memuse. cs7����fd�}�|_�|_�|_|S(Ncs�ts.d}|j|��dtk�n^tt���}|�krutrqtjjd�jf�ndSt |dt��}�||�S(Niis)Skipping %s because of memory constraint i2( Rt assertFalseR�R�RRNR�R[R<tmax(Ratmaxsize(R tmemusetminsizetoverhead(s-/usr/lib64/python2.7/test/support/__init__.pyR��s"  (R�R�R�(R R�(R�R�R�(R s-/usr/lib64/python2.7/test/support/__init__.pyR��s    ((R�R�R�R�((R�R�R�s-/usr/lib64/python2.7/test/support/__init__.pyR)ws cs����fd�}|S(Ncs7����fd�}�|_�|_�|_|S(Ncsftsd}n�}ts"� rYt|�krYtrUtjjd�jf�ndS�||�S(Nis)Skipping %s because of memory constraint (R�RRNR�R[R<(RaR�(tdry_runR R�R�(s-/usr/lib64/python2.7/test/support/__init__.pyR��s   (R�R�R�(R R�(RR�R�R�(R s-/usr/lib64/python2.7/test/support/__init__.pyR��s    ((R�R�R�RR�((RR�R�R�s-/usr/lib64/python2.7/test/support/__init__.pytprecisionbigmemtest�scs�fd�}|S(s0Decorator for tests that fill the address space.cs@ttkr2tr<tjjd�jf�q<n �|�SdS(Ns)Skipping %s because of memory constraint (RR�RRNR�R[R<(Ra(R (s-/usr/lib64/python2.7/test/support/__init__.pyR��s   ((R R�((R s-/usr/lib64/python2.7/test/support/__init__.pyR*�scBseZd�ZRS(cCstj�}||�|S(N(RGt TestResult(RaR�R�((s-/usr/lib64/python2.7/test/support/__init__.pytrun�s  (R<R=R(((s-/usr/lib64/python2.7/test/support/__init__.pyR+�scCs|S(N((Rp((s-/usr/lib64/python2.7/test/support/__init__.pyt_id�scCsP|dkr&t� r&tjtj�St|�r6tStjdj|��SdS(NR�sresource {0!r} is not enabled(R�RGtskipR�RRR�(R�((s-/usr/lib64/python2.7/test/support/__init__.pytrequires_resource�s  cCstdt�|�S(s9 Decorator for tests only applicable on CPython. tcpython(t impl_detailRV(R�((s-/usr/lib64/python2.7/test/support/__init__.pyR2�scKs}t|�rtS|dkrpt|�\}}|r=d}nd}t|j��}|jdj|��}ntj |�S(Ns*implementation detail not available on {0}s%implementation detail specific to {0}s or ( R3RRYt _parse_guardstsortedR�R�R�RGR(RLtguardst guardnamestdefault((s-/usr/lib64/python2.7/test/support/__init__.pyR�s   cCs2|sitd6tfS|j�d}|| fS(NRi(RVRXtvalues(R tis_true((s-/usr/lib64/python2.7/test/support/__init__.pyR �scKs.t|�\}}|jtj�j�|�S(s5This function returns True or False depending on the host platform. Examples: if check_impl_detail(): # only on CPython (default) if check_impl_detail(jython=True): # only on Jython if check_impl_detail(cpython=False): # everywhere except on CPython (R RoR�tpython_implementationR�(R R ((s-/usr/lib64/python2.7/test/support/__init__.pyR3�scCsrg}x\|jD]Q}t|tj�rEt||�|j|�q||�r|j|�qqW||_dS(s>Recursively filter test cases in a suite based on a predicate.N(t_testsRiRGt TestSuitet _filter_suiteR\(tsuitetpredtnewtestsR�((s-/usr/lib64/python2.7/test/support/__init__.pyR�s  cCs�tr'tjtjdddt�}n t�}|j|�}|j r\|j r\t �n|j �s�t |j �dkr�|j r�|j dd}nLt |j�dkr�|j r�|jdd}nd}ts�|d7}nt|��ndS( s2Run tests from a unittest.TestSuite-derived class.t verbosityitfailfastiismultiple errors occurreds!; run in verbose mode for detailsN(RRGtTextTestRunnerRNRsRR+RttestsRuntskippedRt wasSuccessfulR�terrorstfailuresR(RtrunnerR�R|((s-/usr/lib64/python2.7/test/support/__init__.pyt _run_suites      cCs$tdkrtSt|j��SdS(N(t_match_test_funcRYRVtid(R�((s-/usr/lib64/python2.7/test/support/__init__.pyt match_test#s cCsd|kotjd|� S(NRMs[?*\[\]](Rstsearch(tpattern((s-/usr/lib64/python2.7/test/support/__init__.pyt_is_full_match_test+scs�|tkrdS|s%d}d}nittt|��rLt|�j}nBdjttj |��}t j |�j ��fd�}|}t |�a|adS(Nt|cs0�|�rtStt�|jd���SdS(NRM(RVtanyR�R�(ttest_id(t regex_match(s-/usr/lib64/python2.7/test/support/__init__.pytmatch_test_regexJs ((t_match_test_patternsRYtallR�R&R�t __contains__R�tfnmatcht translateRsRHRtR�R!(tpatternsRztregexR+((R*s-/usr/lib64/python2.7/test/support/__init__.pytset_match_tests5s    cGs�tjtjf}tj�}x�|D]�}t|t�rx|tjkri|jtjtj|��q�t d��q%t||�r�|j|�q%|jtj |��q%Wt |t �t |�dS(s1Run tests from unittest.TestCase-derived classes.s)str arguments must be keys in sys.modulesN(RGRtTestCaseRiRIRNROtaddTestt findTestCasesR�t makeSuiteRR#R (tclassest valid_typesRtcls((s-/usr/lib64/python2.7/test/support/__init__.pyR,]s    Rtwin32tWITH_DOC_STRINGSstest requires docstringscCs�ddl}|dkr!t}nd}tj}t�t_z>|j|d|�\}}|rytd||f��nWd|t_Xtr�d|j|fGHn||fS(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). i����NRs%d of %d doctests faileds,doctest (%s) ... %d tests with zero failures( tdoctestRYRRNRsR ttestmodRR<(ReRR=t save_stdoutR R�((s-/usr/lib64/python2.7/test/support/__init__.pyR-|s      cCstrtj�fSdSdS(Ni(i(tthreadt_count(((s-/usr/lib64/python2.7/test/support/__init__.pyR.�s cCsTts dSd}x=t|�D]/}tj�}||kr?Pntjd�qWdS(Ni g�������?(R@RRAR�R�(t nb_threadst _MAX_COUNTtcountR�((s-/usr/lib64/python2.7/test/support/__init__.pyR/�s  cs,ts �Stj���fd��}|S(s�Use 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. cs)t�}z�|�SWdt|�XdS(N(R.R/(R{tkey(Rz(s-/usr/lib64/python2.7/test/support/__init__.pyR��s (R@R�R�(RzR�((Rzs-/usr/lib64/python2.7/test/support/__init__.pyR0�sgN@ccs�tj�}z dVWdtj�}||}x�tr�tj�}||krSPntj�|kr�tj�|}d|||||f}t|��ntjd�t�q1WXdS(sE bpo-31234: Context manager to wait until all threads created in the with statement exit. Use thread.count() to check if threads exited. Indirectly, wait until threads exit the internal t_bootstrap() C function of the thread module. threading_setup() and threading_cleanup() are designed to emit a warning if a test leaves running threads in the background. This context manager is designed to cleanup threads started by the thread.start_new_thread() which doesn't allow to wait for thread exit, whereas thread.Thread has a join() method. NsYwait_threads() failed to cleanup %s threads after %.1f seconds (count: %s, old count: %s)g{�G�z�?(R@RAR�RVRxR�R�(R�t old_countt start_timetdeadlineRDtdtRL((s-/usr/lib64/python2.7/test/support/__init__.pytwait_threads_exit�s         cCscttd�r_d}xGtr[y/tj|tj�\}}|dkrLPnWqPqXqWndS(s�Use 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. twaitpidi����iN(R�RuRVRKtWNOHANG(t any_processR+tstatus((s-/usr/lib64/python2.7/test/support/__init__.pyR7�s   c cs�t|�}g}zfy,x%|D]}|j�|j|�qWWn.trkdt|�t|�fGHn�nXdVWd|r�|�ntj�}}x�tdd�D]�}|d7}x.|D]&}|jt|tj�d��q�Wg|D]}|j �r�|^q�}|sPntr�dt|�|fGHq�q�WXg|D]}|j �rE|^qE}|r�t dt|���ndS(Ns/Can't start %d threads, only %d threads startediii<g{�G�z�?s7Unable to join %d threads during a period of %d minutessUnable to join %d threads( RQtstartR\RR�R�RR�R�tisAliveRx(tthreadstunlocktstartedR�tendtimet starttimeR�((s-/usr/lib64/python2.7/test/support/__init__.pyR1s:       $%%ccs�t||�rNt||�}t|||�z |VWdt|||�Xn<t|||�z dVWdt||�r�t||�nXdS(s�Temporary 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. The old value (or None if it doesn't exist) will be assigned to the target of the "as" clause, if there is one. N(R�RgR�tdelattr(RpRftnew_valtreal_val((s-/usr/lib64/python2.7/test/support/__init__.pyt swap_attr)s  ccsk||kr:||}|||<z |VWd|||<Xn-|||<z dVWd||krf||=nXdS(s�Temporary swap out an item with a new object. Usage: with swap_item(obj, "item", 5): ... This will set obj["item"] to 5 for the duration of the with: block, restoring the old value at the end of the block. If `item` doesn't exist on `obj`, it will be created and then deleted at the end of the block. The old value (or None if it doesn't exist) will be assigned to the target of the "as" clause, if there is one. N((RptitemRWRX((s-/usr/lib64/python2.7/test/support/__init__.pyt swap_itemHs       cCs\y|j�SWnGtk rWydjd�|D��SWqXtk rSt|�SXnXdS(sZEmulate the py3k bytes() constructor. NOTE: This is only a best effort function. R�css|]}t|�VqdS(N(tchr(t.0R((s-/usr/lib64/python2.7/test/support/__init__.pys <genexpr>rsN(ttobytesRhR�t TypeErrortbytes(tb((s-/usr/lib64/python2.7/test/support/__init__.pyR5gs  t getcountss-types are immortal if COUNT_ALLOCS is definedcCsddl}|j�S(sZReturn a list of command-line arguments reproducing the current settings in sys.flags.i����N(t subprocesst_args_from_interpreter_flags(Rc((s-/usr/lib64/python2.7/test/support/__init__.pytargs_from_interpreter_flagsys cCstjdd|�j�}|S(s�Strip the stderr of a Python process from potential debug output emitted by the interpreter. This will typically be run on the result of the communicate() method of a subprocess.Popen object. s\[\d+ refs\]\r?\n?$R�(Rstsubtstrip(R�((s-/usr/lib64/python2.7/test/support/__init__.pyR8scsid|f��fd��Y}tg�|||���|jtt��t�|j�d�dS(NtAcseZ��fd�ZRS(cs0t�d<yt��Wntk r+nXdS(Ni(RVtnextt StopIteration(Ra(tdonetit(s-/usr/lib64/python2.7/test/support/__init__.pyt__del__�s   (R<R=Rm((RkRl(s-/usr/lib64/python2.7/test/support/__init__.pyRh�si(RXt assertRaisesRjRiR�t assertTrue(R�titerR:R{Rh((RkRls-/usr/lib64/python2.7/test/support/__init__.pytcheck_free_after_iterating�s  ccs:tj�}tj�z dVWd|r5tj�nXdS(N(R�t isenabledtdisabletenable(thave_gc((s-/usr/lib64/python2.7/test/support/__init__.pyt disable_gc�s    cCsTtjd�pd}d}x,|j�D]}|jd�r(|}q(q(W|dkS(s,Find if Python was built with optimizations.t PY_CFLAGSR�s-Os-O0s-Og(R�s-O0s-Og(t sysconfigtget_config_varR�RR(tcflagst final_opttopt((s-/usr/lib64/python2.7/test/support/__init__.pytpython_is_optimized�s  cBs,eZdZdZdZd�Zd�ZRS(s�Try to prevent a crash report from popping up. On Windows, don't display the Windows Error Reporting dialog. On UNIX, disable the creation of coredump file. c Cstjjd�r�ddl}|jj|_d}|jj|�|_|jj|j|B�yddl }|j Wnt t fk r�qXi|_ x|j|j|jgD]C}|j ||j�}|j||j�}||f|j |<q�Wnyddl}Wnt k r%d}nX|dk r�y9|j|j�|_|j|jd|jdf�Wq�ttfk r�q�Xntjdkrddl}dd d d g} |j| d |jd |j�} | j�d} | j�dkrtj j!d�tj j"�qn|S(s�On Windows, disable Windows Error Reporting dialogs using SetErrorMode. On UNIX, try to save the previous core file size limit, then set soft limit to 0. R~i����NiiiR�s/usr/bin/defaultsRZscom.apple.CrashReportert DialogTypeRsR�t developers:this test triggers the Crash Reporter, that is intentional(#RNR�RRR�R�tkernel32t_k32t SetErrorModet old_valueR�tCrtSetReportModeRhRFt old_modestCRT_WARNt CRT_ERRORt CRT_ASSERTtCRTDBG_MODE_FILEtCrtSetReportFiletCRTDBG_FILE_STDERRR�RYt getrlimitt RLIMIT_COREt setrlimitR�R�RctPopentPIPEt communicateRgRsR[tflush( RaR�tSEM_NOGPFAULTERRORBOXR�t report_typetold_modetold_fileR�RctcmdtprocRs((s-/usr/lib64/python2.7/test/support/__init__.pyR��sV                  cGs�|jdkrdStjjd�r�|jj|j�|jr�ddl}xF|jj �D]2\}\}}|j ||�|j ||�q]Wq�n@ddl }y|j |j|j�Wnttfk r�nXdS(sARestore Windows ErrorMode or core file behavior to initial value.NR~i����(R�RYRNR�RRR�R�R�R�R]R�R�R�R�R�R�R�(RaR�R�R�R�R�R�((s-/usr/lib64/python2.7/test/support/__init__.pyR�s  " N(R<R=R>RYR�R�R�R�(((s-/usr/lib64/python2.7/test/support/__init__.pyR;�s  GcCs*ddl}t��|j�WdQXdS(s�Deliberate crash of Python. Python can be killed by a segmentation fault (SIGSEGV), a bus error (SIGBUS), or a different error depending on the platform. Use SuppressCrashReport() to prevent a crash report from popping up. i����N(R�R;t _read_null(R�((s-/usr/lib64/python2.7/test/support/__init__.pyt _crash_pythons  c Cs�tjjd �rdy!tjd�}t|�dSWqdtk r`}|jtjkra�qaqdXnd}t td�r�ytj d�}Wq�tk r�q�Xnd }tjdkr+yd d l }|j Wnttfk r�q+Xi}x9|j|j|jfD]}|j |d �||<qWnzyd }xlt|�D]^}ytj|�}Wn+tk r�} | jtjkr��q�qAXtj|�|d7}qAWWd |d k r�x7|j|j|jfD]}|j |||�q�WnX|S( s/Count the number of open file descriptors. tlinuxtfreebsds /proc/self/fdiitsysconft SC_OPEN_MAXR;i����Ni(R�R�(RNR�RRRuR�R�R�R�R�R�R�RYtmsvcrtR�RhRFR�R�R�RtduptEBADFR�( tnamesR�tMAXFDR�R�R�RDtfdtfd2R�((s-/usr/lib64/python2.7/test/support/__init__.pytfd_count#sR         t SaveSignalscBs)eZdZd�Zd�Zd�ZRS(s� Save an restore signal handlers. This class is only able to save/restore signal handlers registered by the Python signal module: see bpo-13285 for "external" signal handlers. cCs�ddl}||_ttd|j��|_xHdD]@}yt||�}Wntk rfq7nX|jj|�q7Wi|_dS(Ni����itSIGKILLtSIGSTOP(R�R�( tsignalRQRtNSIGtsignalsRgRhRwthandlers(RaR�tsignametsignum((s-/usr/lib64/python2.7/test/support/__init__.pyRchs    cCsIxB|jD]7}|jj|�}|dkr4q n||j|<q WdS(N(R�R�t getsignalRYR�(RaR�thandler((s-/usr/lib64/python2.7/test/support/__init__.pytsaveus  cCs7x0|jj�D]\}}|jj||�qWdS(N(R�R]R�(RaR�R�((s-/usr/lib64/python2.7/test/support/__init__.pytrestore�s(R<R=R>RcR�R�(((s-/usr/lib64/python2.7/test/support/__init__.pyR�_s ((ii@i@i@ii(i@ii(((((�R>R<RFt contextlibR�R/R�R�R�RwRNRuR�R�R@RGREtUserDictRsR�R�RxRjR@RYt__all__t SHORT_TIMEOUTR�RRRRHRtcontextmanagerRVRDRXRRUR[R6R4RRRR�RRrRR R R}RRR�R�R�R�R R�R R R�RRRRRR�R�RRRR9R RRt PIPE_MAX_SIZEt SOCK_MAX_SIZERRRt NameErrort skipUnlesstrequires_unicodeRt FS_NONASCIItunichrt characterR$R%tdecodet UnicodeErrorRJRRitTESTFN_UNICODEtTESTFN_ENCODINGR�RtTESTFN_UNENCODABLEtevalR&R�R(t TEST_HTTP_URLR-RR,R0RRyR�tabspatht__file__tTEST_SUPPORT_DIRR6R�RXRRRDRRtobjectR^R�RR R!t DictMixinR"R�R%R&R#R$R�R�R�R�R�R�R�R�R�R�R'R:R�R�R�t_4GR�R�R(R)RR*R+RRR2RR R3RR R!R,R#R&R3R,RytHAVE_DOCSTRINGStrequires_docstringsR-tenvironment_alteredR.R/R0RJR7R1RYR[R5tskipIftrequires_type_collectingReR8RqRvR}R;R�R�R�(((s-/usr/lib64/python2.7/test/support/__init__.pyt<module>s�                                    &      !         J  < $                               .    * ' /D         $ "     '       (    &  #       e  <