Current File : //usr/lib/python3/dist-packages/lazr/restfulclient/tests/__pycache__/test_docs.cpython-312.pyc
�

�Ben���dZeZdgZddlZddlZddlZddlZddlm	Z	m
Z
mZmZddl
mZmZej ej"zej$zZd�Zd�Zd
d�Zd	�Zy)zTest harness for doctests.�
load_tests�N)�cleanup_resources�resource_exists�resource_filename�resource_listdir)�install�	uninstallc�f�ddlm}t�tjdd|j
�y)Nr��	WSGILayerz
cookbooks.dev�P)�0lazr.restful.example.base.tests.test_integrationrr�wsgi_intercept�add_wsgi_intercept�make_application)�testrs  �D/usr/lib/python3/dist-packages/lazr/restfulclient/tests/test_docs.py�setUpr/s%��J��I��%�%���Y�7�7��c�\�ddlm}ddlm}t	�||�}i|_d|_y)Nr)�
getUtility)�IFileManager)�zope.componentr�$lazr.restful.example.base.interfacesrr	�files�counter)rrr�file_managers    r�tearDownr8s'��)�A�
�K��l�+�L��L���L�rc
��g}tdd�rrtdd�D]c}|�|j|�r�|j|�s�)|jtj
j
tdd|z����e|S)z(Find doctests matching a certain suffix.zlazr.restfulclient�docszdocs/%s)rr�endswith�append�os�path�abspathr)�suffix�
ignore_suffix�
doctest_files�names    r�
find_doctestsr*Cs����M��+�V�4�$�%9�6�B�
	�D��(�T�]�]�=�-I���}�}�V�$��$�$��G�G�O�O�)�0�)�d�2B����	
	��rc�6�ddlm}tjt�tjtdd��dtttd��}||_|j|�|jtjtd�dtd���|S)	zLoad all the doctests.rrz.rstz.standalone.rst)r'F)�module_relative�optionflagsrr)r,r-)
rr�atexit�registerr�doctest�DocFileSuiter*�
DOCTEST_FLAGSrr�layer�addTest)�loader�tests�patternr�
restful_suites     rrrVs��J�
�O�O�%�&��(�(�	�v�->�	?��!����M�$�M��	�M�M�-� �	�M�M����
�,�
-�!�%�	
���Lr)N)�__doc__�type�
__metaclass__�__all__r.r0r#r�
pkg_resourcesrrrr�!wsgi_intercept.httplib2_interceptrr	�ELLIPSIS�NORMALIZE_WHITESPACE�REPORT_NDIFFr2rrr*r�rr�<module>rCss�� ��
������	����A����w�3�3�3�g�6J�6J�J��
���&r