a „oe°&ã @snddlZddlZddlZddlZddlZddlZzeZWneyTej dZYn0ej   ej   ed¡¡Z ddlZe ejd<ddlZddlZddlmZmZmZmZmZmZmZdZdd„Zdd„Zd d „Zd d „ZGd d„deƒZGdd„deƒZ d !¡d !¡d !¡d !¡gZ"d !¡ggggZ#gddggggZ$gee ggggZ%dd„Z&d3dd„Z'dd„Z(e)dkrjze ej dd…d¡\Z*Z+Wn0ej,y´Z-ze(e-ƒWYdZ-[-n dZ-[-00e*D]\Z.Z/e.d krºed7Zqºd!Z0gZ1e+D]NZ2z(e3e2ƒZ0e0dkse0d"kre4d#ƒ‚Wne4y.e1 5e2¡Yn0qäe1rBe(d$ƒeƒe'e0ƒ\Z6Z7erºe8ed%ƒr~e9d&ƒe9d'ƒe9d(ƒe9d)e0e6 :¡fƒedkrºe6 :¡d*krºe9d+e6 :¡ƒeed,Z;e;  ?d-¡e7D]4\Z@\ZAZBd.  e CeAeB¡¡ZDe=j> Ed/e@eDf¡qäe=j> ?d0eFe7ƒ¡e= G¡sBe9d1d2ƒeƒe H¡eƒe= G¡sje Id¡dS)4éNz../..)ÚCapturingFunctionTestCaseÚ CheckCleanÚRegisterPythonServerÚ ShellTestCaseÚTestCaseÚ TestLoaderÚ TestRunnerécCs0ddlm}| ¡z W| ¡n | ¡0dS)Nr ©ÚGenTestScripts)Úr Z GenerateAllZCleanAllr ©r ú6C:\Program Files\Certbot\pkgs\win32com\test\testall.pyÚGenerateAndRunOldStyle's  rcCsXddl}ddl}tj |j¡r@tdkr4td|jƒ| |j¡ddl }|j j   ¡dS)Nrr zDeleting files from %s) ÚshutilÚwin32comÚosÚpathÚisdirZ __gen_path__Ú verbosityÚprintÚrmtreeZwin32com.client.gencacheZclientZgencacheÚ__init__)rrr r rÚCleanGenerated1s rcCsB| d¡}t d||dd…¡s$q>|dkr0dS|d|…}q|S)NÚ z \[\d+ refs\]r rr )ÚrfindÚreÚmatch)ÚdataZ last_line_posr r rÚRemoveRefCountOutput?s rcCsDt |¡}| ¡ ¡}| ¡}|r&1) rrrÚjoinÚdirnameÚ__file__Ú this_fileÚsysÚ executabler')ÚselfÚfnamer$rr r rÚtestitZsÿü zPyCOMTest.testitN)Ú__name__Ú __module__Ú __qualname__Z no_leak_testsr1r r r rr(Wsr(c@seZdZdd„ZdS)Ú PippoTestcCsNddlm}t|jdƒtj}tj tj  t ¡d¡}d||f}t ||ƒdS)Nr)Ú pippo_serverzPython.Test.Pippoz testPippo.pyz %s "%s" 2>&1) Z win32com.testr6rr+r-r.rrr)r*r,r')r/r6Zpythonr0r$r r rr1ms    zPippoTest.testitN)r2r3r4r1r r r rr5lsr5zùtestIterators testvbscript_regexp testStorage testStreams testWMI policySemantics testShell testROT testxslt testCollections errorSemantics.test testArrays testClipboard testConversionErrors zL testAXScript testDictionary testServers testvb testMarshal zwtestMSOffice.TestAll testMSOfficeEvents.test testAccess.test testExplorer.TestAll testExchange.test ztestmakepy.TestAll z*win32com.directsound.test.ds_test )z/cscript.exe /nologo //E:vbscript testInterp.vbszVBScript test worked OK)z3cscript.exe /nologo //E:vbscript testDictionary.vbsz2VBScript has successfully tested Python.Dictionaryc CsŒ| d¡dkr| d¡\}}n|}d}d|}zt|ƒtj|}Wn(| |t ¡dd…f¡YdS0|durzdnt||ƒ}||fS)NÚ.rzwin32com.test.é)NN)ÚfindÚsplitÚ __import__r-ÚmodulesÚappendÚexc_infoÚgetattr)Z test_nameÚimport_failuresÚmod_nameZ func_nameZ fq_mod_nameÚmodÚfuncr r rÚget_test_mod_and_funcÃsrDc Cs”t ¡}g}tƒ}ttƒD]Î}t|D]~}t||ƒ\}}|durNtd |¡ƒ‚|durdt ||d}nt |dƒrx|  ¡}n |  |¡}|  ¡dksšJd|ƒ‚| |¡q&t|D]\} } | t| | ƒ¡q®t|D]} | tj | ¡¡qÐqttƒD]˜}t|D]Š}z t|ƒWn*| |t ¡dd…f¡YqþYn0tj|}t |dƒrZ|  ¡}n |  |¡}|  ¡dks~Jd|ƒ‚| |¡qþqò||fS)Nzno such module '{}')Ú descriptionÚsuiterzNo tests loaded from %rr8)ÚunittestZ TestSuiterÚrangeÚ testLevelÚunittest_modulesrDÚ ExceptionÚformatrÚhasattrrFZloadTestsFromModuleÚcountTestCasesZaddTestÚoutput_checked_programsrÚcustom_test_casesZdefaultTestLoaderZloadTestsFromTestCaseÚunittest_other_modulesr;r=r-r>r<) Z test_levelrFr@ÚloaderÚirArBrCÚtestr$ÚoutputZ test_classr r rÚmake_test_suiteÕsB               rVcCs<t|ƒtƒtdƒtdƒtdƒtdƒt d¡dS)Nzwin32com test suitezusage: testall [-v] test_levelz? where test_level is an integer 1-3. Level 1 tests are quick,z7 level 2 tests invoke Word, IE etc, level 3 take ages!r )rr-Úexit)Úwhyr r rÚusagesrYÚ__main__Úvz-vr8ézOnly levels 1-4 are supportedz Test names are not supported yetZgettotalrefcountz;This is a debug build - memory leak tests will also be run.z8These tests may take *many* minutes to run - be patient!z5(running from python.exe will avoid these leak tests)z4Executing level %d tests - %d test cases will be runéFú|)rz8*** The following test modules could not be imported ***rz%s: %sz#*** %d test(s) could not be run ***z********************z- unittest tests FAILED)r )JÚgetoptrrr-Ú tracebackrGr+r,Ú NameErrorÚargvrÚabspathr)Zwin32com_src_dirrÚ__path__Z pythoncomZwin32com.clientZwin32com.test.utilrrrrrrrrrrrr'r(r5r:rJrQrOrPrDrVrYr2ZoptsÚargsÚerrorrXÚoptÚvalrIZ test_namesÚargÚintÚ ValueErrorr=rFr@rMrrNZ testRunnerÚrunZ testResultÚstreamZwritelnrAÚexc_typeZexc_valÚformat_exception_onlyZdescÚwriteÚlenZ wasSuccessfulZCoUninitializerWr r r rÚsÊ  $     ë÷þòþõ +        ÿÿ  ÿ ÿ