B
    2*™\¾U  ã               @   sª  d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlZd dlZd dlmZ d dlmZ d dlmZmZ yd dlZW n ek
r°   dZY nX e d¡ZeedƒZdd	„ ZG d
d„ dƒZG dd„ dejƒZG dd„ dejƒZG dd„ dejƒZG dd„ dejƒZ G dd„ dejƒZ!G dd„ dejƒZ"G dd„ de"ƒZ#e $e %¡ d¡G dd„ de"ƒƒZ&e $ed¡G dd„ de"ƒƒZ'e(d kr¦e )¡  dS )!é    )ÚOrderedDictN)Úsupport)ÚMISSING_C_DOCSTRINGS)Úassert_python_failureÚassert_python_okÚ	_testcapiZgettotalrefcountc             C   s   | S )zsome doc© )Úselfr   r   ú9C:\ALexclude\prg\programme\Python37\Lib\test\test_capi.pyÚtestfunction   s    r   c               @   s    e Zd Ze e¡Ze e¡ZdS )ÚInstanceMethodN)Ú__name__Ú
__module__Ú__qualname__r   ZinstancemethodÚidr   r   r   r   r
   r   #   s   
r   c               @   s    e Zd Zdd„ Zdd„ Zdd„ Zdd„ Ze e	d	¡d
d„ ƒZ
e e	d	¡dd„ ƒZe ed¡dd„ ƒZdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS ) ÚCAPITestc             C   s~   t ƒ }|  t|ƒ| ¡ ¡ |  | ¡ |k¡ |  |jjtj¡ |  t jjtj¡ dt j_|  tjd¡ |  tt	|jdd¡ d S )NÚtestÚ	attribute)
r   ÚassertEqualr   Ú
assertTruer   Ú__doc__r   ÚassertRaisesÚAttributeErrorÚsetattr)r	   Zinstr   r   r
   Útest_instancemethod)   s    zCAPITest.test_instancemethodc          	   C   s`   t  ¡ " tjtjddgtjtjd}W d Q R X | ¡ \}}|  |d¡ |  	| 
¡  d¡¡ d S )Nz-cz4import _testcapi;_testcapi.crash_no_current_thread())ÚstdoutÚstderró    s8   Fatal Python error: PyThreadState_Get: no current thread)r   ÚSuppressCrashReportÚ
subprocessÚPopenÚsysÚ
executableÚPIPEZcommunicater   r   ÚrstripÚ
startswith)r	   ÚpÚoutÚerrr   r   r
   Ú test_no_FatalError_infinite_loop4   s    

z)CAPITest.test_no_FatalError_infinite_loopc             C   s   |   ttj¡ d S )N)r   Ú
ValueErrorr   Z!make_memoryview_from_NULL_pointer)r	   r   r   r
   Ú!test_memoryview_from_NULL_pointerB   s    z*CAPITest.test_memoryview_from_NULL_pointerc       
   
   C   sÞ   t dƒ}tdƒ}y|‚W n¶ t k
rÎ } z˜|j}t ¡ }t |j|d ¡}t ¡ }tj|Ž }t ¡ }	|  |d |¡ |  	||j||f¡ |  	||¡ |  	|	|¡ |  	||j|d f¡ |  	||¡ W d d }~X Y nX |  
d¡ d S )NÚ5ZTESTé   F)r*   Ú	TypeErrorÚ__traceback__r!   Úexc_infor   Zset_exc_infoÚ	__class__r   ZassertSequenceEqualr   )
r	   Zraised_exceptionÚnew_excÚeÚtbZorig_sys_exc_infoZorig_exc_infoZnew_sys_exc_infoZnew_exc_infoZreset_sys_exc_infor   r   r
   Útest_exc_infoE   s$    
zCAPITest.test_exc_infoz(_posixsubprocess required for this test.c             C   sˆ   G dd„ dt ƒ}|  ttjd|ƒ dddddd	d
dddddddd¡ G dd„ dt ƒ}|  ttjd|ƒ dddddd	d
dddddddd¡ d S )Nc               @   s   e Zd Zdd„ ZdS )z1CAPITest.test_seq_bytes_to_charp_array.<locals>.Zc             S   s   dS )Nr-   r   )r	   r   r   r
   Ú__len__`   s    z9CAPITest.test_seq_bytes_to_charp_array.<locals>.Z.__len__N)r   r   r   r6   r   r   r   r
   ÚZ_   s   r7   r-   é   )r-   é   é   é   é   é   é	   é
   é   é   é   é   é   é   é   c               @   s   e Zd Zdd„ Zdd„ ZdS )z1CAPITest.test_seq_bytes_to_charp_array.<locals>.Zc             S   s   t jS )N)r!   Úmaxsize)r	   r   r   r
   r6   f   s    z9CAPITest.test_seq_bytes_to_charp_array.<locals>.Z.__len__c             S   s   dS )Nó   xr   )r	   Úir   r   r
   Ú__getitem__h   s    z=CAPITest.test_seq_bytes_to_charp_array.<locals>.Z.__getitem__N)r   r   r   r6   rJ   r   r   r   r
   r7   e   s   )Úobjectr   r.   Ú_posixsubprocessÚ	fork_execÚMemoryError)r	   r7   r   r   r
   Útest_seq_bytes_to_charp_array\   s    
(
z&CAPITest.test_seq_bytes_to_charp_arrayc             C   sH   G dd„ dt ƒ}|  ttj|ƒ dgdddddd	d
dddddddd¡ d S )Nc               @   s   e Zd Zdd„ ZdS )z-CAPITest.test_subprocess_fork_exec.<locals>.Zc             S   s   dS )Nr-   r   )r	   r   r   r
   r6   p   s    z5CAPITest.test_subprocess_fork_exec.<locals>.Z.__len__N)r   r   r   r6   r   r   r   r
   r7   o   s   r7   ó   1r8   )r-   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   )rK   r   r.   rL   rM   )r	   r7   r   r   r
   Útest_subprocess_fork_execm   s    
z"CAPITest.test_subprocess_fork_execz6Signature information for builtins requires docstringsc             C   s  |   tjjd ¡ |   tjjd ¡ |   tjjd ¡ |   tjjd ¡ |   tjjd¡ |   tjjd ¡ |   tjjd¡ |   tjjd ¡ |   tjjd¡ |   tjjd ¡ |   tj	jd¡ |   tj	jd¡ |   tj
jd ¡ |   tj
jd¡ |   tjjd¡ |   tjjd¡ d S )Nz This docstring has no signature.z[docstring_with_invalid_signature($module, /, boo)

This docstring has an invalid signature.zedocstring_with_invalid_signature2($module, /, boo)

--

This docstring also has an invalid signature.z%This docstring has a valid signature.z($module, /, sig)z>
This docstring has a valid signature and some extra newlines.z($module, /, parameter))r   r   Zno_docstringr   Ú__text_signature__Zdocstring_emptyZdocstring_no_signatureZ docstring_with_invalid_signatureZ!docstring_with_invalid_signature2Zdocstring_with_signatureZ#docstring_with_signature_but_no_docZ+docstring_with_signature_and_extra_newlines)r	   r   r   r
   Ú test_docstring_signature_parsingw   s.    






z)CAPITest.test_docstring_signature_parsingc             C   s²   t j}|ƒ }|ƒ }|  || d||f¡ |  |d d|df¡ |  d| dd|f¡ |}|| }|  |d||f¡ |}|d }|  |d|df¡ d}|| }|  |dd|f¡ d S )NÚmatmulé*   Úimatmul)r   Z
matmulTyper   )r	   ÚMZm1Zm2Úor   r   r
   Ú&test_c_type_with_matrix_multiplication¢   s    z/CAPITest.test_c_type_with_matrix_multiplicationc          	   C   sh   t r4t d¡}td|ƒ\}}}|  | dd¡d¡ n0|  t¡}t 	¡  W d Q R X |  t
|jƒd¡ d S )NzÆ
                import _testcapi
                from test import support

                with support.SuppressCrashReport():
                    _testcapi.return_null_without_error()
            z-có   r   sÝ   Fatal Python error: a function returned NULL without setting an error\nSystemError: <built-in function return_null_without_error> returned NULL without setting an error\n\nCurrent thread.*:\n  File .*", line 6 in <module>zBreturn_null_without_error.* returned NULL without setting an error)ÚPy_DEBUGÚtextwrapÚdedentr   ÚassertRegexÚreplacer   ÚSystemErrorr   Zreturn_null_without_errorÚstrÚ	exception)r	   ÚcodeÚrcr'   r(   Úcmr   r   r
   Útest_return_null_without_error³   s    	z'CAPITest.test_return_null_without_errorc          	   C   sh   t r4t d¡}td|ƒ\}}}|  | dd¡d¡ n0|  t¡}t 	¡  W d Q R X |  t
|jƒd¡ d S )NzÅ
                import _testcapi
                from test import support

                with support.SuppressCrashReport():
                    _testcapi.return_result_with_error()
            z-crZ   r   s+  Fatal Python error: a function returned a result with an error set\nValueError\n\nThe above exception was the direct cause of the following exception:\n\nSystemError: <built-in function return_result_with_error> returned a result with an error set\n\nCurrent thread.*:\n  File .*, line 6 in <module>z>return_result_with_error.* returned a result with an error set)r[   r\   r]   r   r^   r_   r   r`   r   Zreturn_result_with_errorra   rb   )r	   rc   rd   r'   r(   re   r   r   r
   Útest_return_result_with_errorÏ   s    z&CAPITest.test_return_result_with_errorc             C   s   t  ¡  d S )N)r   Útest_buildvalue_N)r	   r   r   r
   rh   ï   s    zCAPITest.test_buildvalue_Nc             C   s<   d}t d|ƒ\}}}|  d|¡ |  d|¡ |  d|¡ d S )Na*  if 1:
            import _testcapi

            class C(): pass

            # The first loop tests both functions and that remove_mem_hooks()
            # can be called twice in a row. The second loop checks a call to
            # set_nomemory() after a call to remove_mem_hooks(). The third
            # loop checks the start and stop arguments of set_nomemory().
            for outer_cnt in range(1, 4):
                start = 10 * outer_cnt
                for j in range(100):
                    if j == 0:
                        if outer_cnt != 3:
                            _testcapi.set_nomemory(start)
                        else:
                            _testcapi.set_nomemory(start, start + 1)
                    try:
                        C()
                    except MemoryError as e:
                        if outer_cnt != 3:
                            _testcapi.remove_mem_hooks()
                        print('MemoryError', outer_cnt, j)
                        _testcapi.remove_mem_hooks()
                        break
        z-cs   MemoryError 1 10s   MemoryError 2 20s   MemoryError 3 30)r   ÚassertIn)r	   rc   rd   r'   r(   r   r   r
   Útest_set_nomemoryò   s
    zCAPITest.test_set_nomemoryc          	   C   s®   G dd„ dt ƒ}G dd„ dt ƒ}ddddœ}x|i tƒ |ƒ |ƒ |t|ƒ||ƒ||ƒgD ]R}|  t |¡t| ¡ ƒ¡ |  t |¡t| ¡ ƒ¡ |  t 	|¡t| 
¡ ƒ¡ qTW d S )	Nc                   s4   e Zd Z‡ fdd„Z‡ fdd„Z‡ fdd„Z‡  ZS )z9CAPITest.test_mapping_keys_values_items.<locals>.Mapping1c                s   t tƒ  ¡ ƒS )N)ÚlistÚsuperÚkeys)r	   )r1   r   r
   rm     s    z>CAPITest.test_mapping_keys_values_items.<locals>.Mapping1.keysc                s   t tƒ  ¡ ƒS )N)rk   rl   Úvalues)r	   )r1   r   r
   rn     s    z@CAPITest.test_mapping_keys_values_items.<locals>.Mapping1.valuesc                s   t tƒ  ¡ ƒS )N)rk   rl   Úitems)r	   )r1   r   r
   ro     s    z?CAPITest.test_mapping_keys_values_items.<locals>.Mapping1.items)r   r   r   rm   rn   ro   Ú__classcell__r   r   )r1   r
   ÚMapping1  s   rq   c                   s4   e Zd Z‡ fdd„Z‡ fdd„Z‡ fdd„Z‡  ZS )z9CAPITest.test_mapping_keys_values_items.<locals>.Mapping2c                s   t tƒ  ¡ ƒS )N)Útuplerl   rm   )r	   )r1   r   r
   rm     s    z>CAPITest.test_mapping_keys_values_items.<locals>.Mapping2.keysc                s   t tƒ  ¡ ƒS )N)rr   rl   rn   )r	   )r1   r   r
   rn     s    z@CAPITest.test_mapping_keys_values_items.<locals>.Mapping2.valuesc                s   t tƒ  ¡ ƒS )N)rr   rl   ro   )r	   )r1   r   r
   ro     s    z?CAPITest.test_mapping_keys_values_items.<locals>.Mapping2.items)r   r   r   rm   rn   ro   rp   r   r   )r1   r
   ÚMapping2  s   rs   r-   r9   r8   )ÚfooZbarZspam)Údictr   ZassertListEqualr   Úget_mapping_keysrk   rm   Úget_mapping_valuesrn   Úget_mapping_itemsro   )r	   rq   rs   Zdict_objÚmappingr   r   r
   Útest_mapping_keys_values_items  s    z'CAPITest.test_mapping_keys_values_itemsc             C   sx   |   ttjd ¡ |   ttjd ¡ |   ttjd ¡ G dd„ dƒ}|ƒ }|   ttj|¡ |   ttj|¡ |   ttj|¡ d S )Nc               @   s$   e Zd Zdd„ Zdd„ Zdd„ ZdS )zCCAPITest.test_mapping_keys_values_items_bad_arg.<locals>.BadMappingc             S   s   d S )Nr   )r	   r   r   r
   rm   3  s    zHCAPITest.test_mapping_keys_values_items_bad_arg.<locals>.BadMapping.keysc             S   s   d S )Nr   )r	   r   r   r
   rn   5  s    zJCAPITest.test_mapping_keys_values_items_bad_arg.<locals>.BadMapping.valuesc             S   s   d S )Nr   )r	   r   r   r
   ro   7  s    zICAPITest.test_mapping_keys_values_items_bad_arg.<locals>.BadMapping.itemsN)r   r   r   rm   rn   ro   r   r   r   r
   Ú
BadMapping2  s   r{   )r   r   r   rv   rw   rx   r.   )r	   r{   Zbad_mappingr   r   r
   Ú&test_mapping_keys_values_items_bad_arg-  s    z/CAPITest.test_mapping_keys_values_items_bad_argN)r   r   r   r   r)   r+   r5   ÚunittestÚ
skipUnlessrL   rO   rQ   ZskipIfr   rS   rY   rf   rg   rh   rj   rz   r|   r   r   r   r
   r   '   s   
*  r   c               @   s6   e Zd Zdd„ Zddd„Zdd„ Zdd	„ Zd
d„ ZdS )ÚTestPendingCallsc                sF   ‡ fdd„}x4t |ƒD ](}t t ¡ d ¡ xt |¡r.P q.W qW d S )Nc                  s   ˆ   d ¡ d S )N)Úappendr   )Úlr   r
   ÚcallbackB  s    z6TestPendingCalls.pendingcalls_submit.<locals>.callbackg{®Gáz”?)ÚrangeÚtimeÚsleepÚrandomr   Z_pending_threadfunc)r	   r   Únr‚   rI   r   )r   r
   Úpendingcalls_submitA  s    
z$TestPendingCalls.pendingcalls_submitNc             C   s    d}xzt |ƒ|kr~dr.tjr.tdt |ƒf ƒ xtdƒD ]}|| }q8W |rX|j ¡ sXq|d7 }|  |dk d|t |ƒf ¡ qW drœtjrœtdt |ƒf ƒ d S )Nr   Fz(%i)iè  r-   i'  z(timeout waiting for %i callbacks, got %i)Úlenr   ÚverboseÚprintrƒ   ÚeventZis_setr   )r	   r   r‡   ÚcontextÚcountrI   Úar   r   r
   Úpendingcalls_waitP  s    


z"TestPendingCalls.pendingcalls_waitc          	      s”   d}g }G dd„ dt ƒ}|ƒ ‰ g ˆ _dˆ _|ˆ j ˆ _dˆ _t ¡ ˆ _t ¡ ˆ _	‡ ‡fdd„t
ˆ jƒD ƒ}t |¡ ˆ ˆ j|ˆ ¡ W d Q R X d S )Né    c               @   s   e Zd ZdS )z8TestPendingCalls.test_pendingcalls_threaded.<locals>.fooN)r   r   r   r   r   r   r
   rt   h  s    rt   r9   r   c                s   g | ]}t jˆjˆ fd ‘qS ))ÚtargetÚargs)Ú	threadingÚThreadÚpendingcalls_thread)Ú.0rI   )r   r	   r   r
   ú
<listcomp>q  s   z?TestPendingCalls.test_pendingcalls_threaded.<locals>.<listcomp>)rK   r   r‡   ÚnThreadsÚ	nFinishedr”   ZLockÚlockZEventrŒ   rƒ   r   Zstart_threadsr   )r	   r‡   Zthreadsrt   r   )r   r	   r
   Útest_pendingcalls_threadedc  s    

z+TestPendingCalls.test_pendingcalls_threadedc             C   sj   z|   |j|j¡ W d |j. | jd7  _|j}drFtjrFtd|ƒ W d Q R X ||jkrd|j	 
¡  X d S )Nr-   Fzfinished threads: )rˆ   r   r‡   r›   rš   r   rŠ   r‹   r™   rŒ   Úset)r	   r   rš   r   r   r
   r–   w  s    

z$TestPendingCalls.pendingcalls_threadc             C   s$   g }d}|   ||¡ |  ||¡ d S )Né@   )rˆ   r   )r	   r   r‡   r   r   r
   Útest_pendingcalls_non_threadedƒ  s    z/TestPendingCalls.test_pendingcalls_non_threaded)N)r   r   r   rˆ   r   rœ   r–   rŸ   r   r   r   r
   r   ?  s
   
r   c               @   s   e Zd Zdd„ ZdS )ÚSubinterpreterTestc          	   C   s|   dd l }t ¡ \}}d |¡}t|dƒJ}t |¡}|  |d¡ |  t	 
|¡ttjƒ¡ |  t	 
|¡t|ƒ¡ W d Q R X d S )Nr   zÀif 1:
            import sys, builtins, pickle
            with open({:d}, "wb") as f:
                pickle.dump(id(sys.modules), f)
                pickle.dump(id(builtins), f)
            Úrb)ÚbuiltinsÚosÚpipeÚformatÚopenr   Zrun_in_subinterpr   ZassertNotEqualÚpickleÚloadr   r!   Úmodules)r	   r¢   ÚrÚwrc   ÚfÚretr   r   r
   Útest_subinterps  s    

z"SubinterpreterTest.test_subinterpsN)r   r   r   r®   r   r   r   r
   r    Ž  s   r    c               @   s   e Zd Zejdd„ ƒZdS )ÚTestThreadStatec                s2   ‡ fdd„}|ƒ  t j|d}| ¡  | ¡  d S )Nc                 sH   g ‰ ‡ fdd„} t  | ¡ |  }}t d¡ ˆ ˆ  t ¡ ¡dd¡ d S )Nc                  s   ˆ   t ¡ ¡ d S )N)r€   r”   Ú	get_identr   )Úidentsr   r
   r‚   ¨  s    zCTestThreadState.test_thread_state.<locals>.target.<locals>.callbackr-   r8   z/Couldn't find main thread correctly in the list)r   Z_test_thread_stater„   r…   r   rŽ   r”   r°   )r‚   r   Úb)r	   )r±   r
   r’   ¥  s    

z1TestThreadState.test_thread_state.<locals>.target)r’   )r”   r•   ÚstartÚjoin)r	   r’   Útr   )r	   r
   Útest_thread_state¢  s
    z!TestThreadState.test_thread_stateN)r   r   r   r   Zreap_threadsr¶   r   r   r   r
   r¯      s   r¯   c               @   s&   e Zd Zeƒ  dd„ eeƒD ƒ¡ dS )ÚTest_testcapic             c   s0   | ](}|  d ¡r| d¡s|tt|ƒfV  qdS )Ztest_Ú_codeN)r%   ÚendswithÚgetattrr   )r—   Únamer   r   r
   ú	<genexpr>¹  s   zTest_testcapi.<genexpr>N)r   r   r   ÚlocalsÚupdateÚdirr   r   r   r   r
   r·   ¸  s   r·   c               @   sD   e Zd ZdZdZdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Z	dd„ Z
dS )ÚPyMemDebugTestsÚdebugz(?:0x)?[0-9a-fA-F]+c          	   C   s6   t  ¡  td|| jd}W d Q R X |j}| dd¡S )Nz-c)ÚPYTHONMALLOCÚasciir_   )r   r   r   rÂ   r(   Údecode)r	   rc   r'   r   r   r   r
   ÚcheckÃ  s
    
zPyMemDebugTests.checkc             C   s<   |   d¡}d}|j| jd}tj|tjd}|  ||¡ d S )Nz3import _testcapi; _testcapi.pymem_buffer_overflow()a  Debug memory block at address p={ptr}: API 'm'\n    16 bytes originally requested\n    The [0-9] pad bytes at p-[0-9] are FORBIDDENBYTE, as expected.\n    The [0-9] pad bytes at tail={ptr} are not all FORBIDDENBYTE \(0x[0-9a-f]{{2}}\):\n        at tail\+0: 0x78 \*\*\* OUCH\n        at tail\+1: 0xfb\n        at tail\+2: 0xfb\n        .*\n    The block was made by call #[0-9]+ to debug malloc/realloc.\n    Data at p: cb cb cb .*\n\nEnable tracemalloc to get the memory block allocation traceback\n\nFatal Python error: bad trailing pad byte)Úptr)Úflags)rÅ   r¥   Ú	PTR_REGEXÚreÚcompileÚDOTALLr^   )r	   r'   Úregexr   r   r
   Útest_buffer_overflowÊ  s
    
z$PyMemDebugTests.test_buffer_overflowc             C   s,   |   d¡}d}|j| jd}|  ||¡ d S )Nz.import _testcapi; _testcapi.pymem_api_misuse()aÍ  Debug memory block at address p={ptr}: API 'm'\n    16 bytes originally requested\n    The [0-9] pad bytes at p-[0-9] are FORBIDDENBYTE, as expected.\n    The [0-9] pad bytes at tail={ptr} are FORBIDDENBYTE, as expected.\n    The block was made by call #[0-9]+ to debug malloc/realloc.\n    Data at p: cb cb cb .*\n\nEnable tracemalloc to get the memory block allocation traceback\n\nFatal Python error: bad ID: Allocated using API 'm', verified using API 'r'\n)rÆ   )rÅ   r¥   rÈ   r^   )r	   r'   rÌ   r   r   r
   Útest_api_misuseÞ  s    

zPyMemDebugTests.test_api_misusec             C   s   |   |¡}d}|  ||¡ d S )NzJFatal Python error: Python memory allocator called without holding the GIL)rÅ   ri   )r	   rc   r'   Zexpectedr   r   r
   Úcheck_malloc_without_gilí  s    
z(PyMemDebugTests.check_malloc_without_gilc             C   s   d}|   |¡ d S )Nz6import _testcapi; _testcapi.pymem_malloc_without_gil())rÏ   )r	   rc   r   r   r
   Útest_pymem_malloc_without_giló  s    z-PyMemDebugTests.test_pymem_malloc_without_gilc             C   s   d}|   |¡ d S )Nz9import _testcapi; _testcapi.pyobject_malloc_without_gil())rÏ   )r	   rc   r   r   r
   Ú test_pyobject_malloc_without_gilù  s    z0PyMemDebugTests.test_pyobject_malloc_without_gilN)r   r   r   rÂ   rÈ   rÅ   rÍ   rÎ   rÏ   rÐ   rÑ   r   r   r   r
   rÀ   ¾  s   rÀ   c               @   s   e Zd ZdZdS )ÚPyMemMallocDebugTestsZmalloc_debugN)r   r   r   rÂ   r   r   r   r
   rÒ      s   rÒ   zneed pymallocc               @   s   e Zd ZdZdS )ÚPyMemPymallocDebugTestsZpymalloc_debugN)r   r   r   rÂ   r   r   r   r
   rÓ     s   rÓ   zneed Py_DEBUGc               @   s   e Zd ZdZdS )ÚPyMemDefaultTestsÚ N)r   r   r   rÂ   r   r   r   r
   rÔ   	  s   rÔ   Ú__main__)*Úcollectionsr   r£   r§   r†   rÉ   r   r!   Z	sysconfigr\   r”   r„   r}   r   r   Ztest.supportr   Ztest.support.script_helperr   r   rL   ÚImportErrorÚimport_moduler   Úhasattrr[   r   r   ZTestCaser   r   r    r¯   r·   rÀ   rÒ   r~   Zwith_pymallocrÓ   rÔ   r   Úmainr   r   r   r
   Ú<module>   sJ   


  OB
