Ben dZeZdgZddlZddlZddlZddlZddlm Z m Z m Z m Z ddl mZmZej ej"zej$zZdZdZd dZd Zy) zTest harness for doctests. load_testsN)cleanup_resourcesresource_existsresource_filenameresource_listdir)install uninstallcfddlm}ttjdd|j y)Nr WSGILayerz cookbooks.devP)0lazr.restful.example.base.tests.test_integrationr rwsgi_interceptadd_wsgi_interceptmake_application)testr s D/usr/lib/python3/dist-packages/lazr/restfulclient/tests/test_docs.pysetUpr/s%J I%%Y77c\ddlm}ddlm}t ||}i|_d|_y)Nr) getUtility) IFileManager)zope.componentr$lazr.restful.example.base.interfacesrr filescounter)rrr file_managers rtearDownr8s')A Kl+LLLrc g}tddrrtddD]c}||j|r|j|s)|jtj j tdd|ze|S)z(Find doctests matching a certain suffix.zlazr.restfulclientdocszdocs/%s)rrendswithappendospathabspathr)suffix ignore_suffix doctest_filesnames r find_doctestsr*CsM+V4$%96B D(T]]=-I}}V$$$GGOO)0)d2B  rc6ddlm}tjtt j tdddtttd}||_ |j||jt j tddtd|S) zLoad all the doctests.rr z.rstz.standalone.rst)r'F)module_relative optionflagsrr)r,r-) rr atexitregisterrdoctest DocFileSuiter* DOCTEST_FLAGSrrlayeraddTest)loadertestspatternr restful_suites rrrVsJ OO%&(( v-> ?! M$M MM-  MM , -!%  Lr)N)__doc__type __metaclass____all__r.r0r#r pkg_resourcesrrrr!wsgi_intercept.httplib2_interceptrr ELLIPSISNORMALIZE_WHITESPACE REPORT_NDIFFr2rrr*rrrrCss     A w333g6J6JJ &r