i\ ddlZddlZddlZddlmZddlmZGddejZe dkrej dSdS)N)Dispatch)EnsureDispatchc>eZdZdZdZdZdZdZdZdZ dZ d S) PippoTesterchddlm}ddlm}||jdt d|_dS)Nr) pippo_server)RegisterPythonServerPython.Test.Pippo) win32com.testrwin32com.test.utilr __file__robject)selfrr s EC:\PYTHON\_runtimes\venv\Lib\site-packages\win32com/test/testPippo.pysetUpzPippoTester.setUp sQ......;;;;;;\24GHHH233 c| tj}n"#t$rtdd}YnwxYw|j|}t dD]%}td}|&d}|}||z dkr|d||z fzdSdS)N,Please run this with python_d for leak testscdSNrrrrz'PippoTester.testLeaks..1rr We lost %d references!) sysgettotalrefcountAttributeErrorprintrMethod1rangerfail)rgtrcstartirends r testLeakszPippoTester.testLeakss 'DD    @ A A A9DDD  t  A122F NN    dff ;?? II.#+? @ @ @ @ @ ? ..c|jdd\}}||d||ddS)N{o)rMethod2 assertEqual)rrcout1s r testResultszPippoTester.testResults#sO;&&sC00D S!!! s#####rcb|gd|gddS)NrgQ r6ggg?g@r:) _testArrayrs rtestPythonArrayszPippoTester.testPythonArrays(s: 000111 ;;;<<<<>>  $G$G$GHHIIIIIsct|d|tddS)Nsabcdef)r< bytearrayr=s rtestByteArrayszPippoTester.testByteArrays5s4  """  ),,-----rc|j|}|t|t|dS)N)rMethod3r/list)rinArrayoutArrays rr<zPippoTester._testArray9s?;&&w// hg77777rch tj}n"#t$rtdd}YnwxYwt d}|}t dD]%}t d}|&d}|}||z dkr|d||z fzdSdS)NrcdSrrrrrrz/PippoTester.testLeaksGencache..Brrr r r)rrrr rr"r!r#)rr$rr%r&r's rtestLeaksGencachezPippoTester.testLeaksGencache=s 'DD    @ A A A9DDD  344t  A#$788F NN    dff ;   II.#+? @ @ @ @ @  r)N) __name__ __module__ __qualname__rr(r2r>rBrEr<rNrrrrr s444AAA"$$$ ===JJJ...888AAAAArr__main__) runittest pythoncomwin32com.clientrwin32com.client.gencacherTestCaserrOmainrrrrYs $$$$$$333333CACACACACA(#CACACAL zHMOOOOOr