a „oeã@stddlZddlZddlZGdd„dejƒZGdd„dejƒZGdd„dejƒZGdd „d ejƒZed krpe  ¡dS) éNc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) ÚTestWaitableTimercCsDt ddd¡}d}t ||dddd¡t |d¡}| |tj¡dS)Nré`ÿÿÿéè)Ú win32eventÚCreateWaitableTimerÚSetWaitableTimerÚWaitForSingleObjectÚ assertEqualÚ WAIT_OBJECT_0©ÚselfÚhZdtÚrc©rú;C:\Program Files\Certbot\pkgs\win32\test\test_win32event.pyÚtestWaitableFires  z"TestWaitableTimer.testWaitableFirecCsJt ddtjtj¡}d}t ||dddd¡t |d¡}| |tj¡dS)Nrrr)rZCreateWaitableTimerExZ%CREATE_WAITABLE_TIMER_HIGH_RESOLUTIONZTIMER_ALL_ACCESSrrr r r rrrÚtestCreateWaitableTimerExsü z+TestWaitableTimer.testCreateWaitableTimerExcCsDt ddd¡}d}t ||dddd¡t |d¡}| |tj¡dS)Nrilʈé )rrrrr Ú WAIT_TIMEOUTr rrrÚtestWaitableTriggers  z%TestWaitableTimer.testWaitableTriggerc Cs6t ddd¡}| ¡| tjtj|ddddd¡dS)NriÖÿÿÿ)rrÚcloseÚ assertRaisesÚ pywintypesÚerrorr)r r rrrÚtestWaitableError#s ÿz#TestWaitableTimer.testWaitableErrorN)Ú__name__Ú __module__Ú __qualname__rrrrrrrrrs rc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) ÚTestWaitFunctionscCs"t gddd¡}| |tj¡dS©Nr)rÚMsgWaitForMultipleObjectsr r©r ÚresrrrÚtestMsgWaitForMultipleObjects,sz/TestWaitFunctions.testMsgWaitForMultipleObjectscCs4t dddd¡}t |gddd¡}| |tj¡dSr)rÚ CreateEventr r r©r Úeventr"rrrÚtestMsgWaitForMultipleObjects21sz0TestWaitFunctions.testMsgWaitForMultipleObjects2cCs"t gddd¡}| |tj¡dSr)rÚMsgWaitForMultipleObjectsExr rr!rrrÚtestMsgWaitForMultipleObjectsEx7sz1TestWaitFunctions.testMsgWaitForMultipleObjectsExcCs4t dddd¡}t |gddd¡}| |tj¡dSr)rr$r(r rr%rrrÚ testMsgWaitForMultipleObjectsEx2<sz2TestWaitFunctions.testMsgWaitForMultipleObjectsEx2N)rrrr#r'r)r*rrrrr+src@s4eZdZdd„Zdd„Zdd„Zdd„Zd d „Zd S) Ú TestEventcCs| t |d¡tj¡dSr)r rrr ©r r&rrrÚassertSignaledDsÿzTestEvent.assertSignaledcCs| t |d¡tj¡dSr)r rrrr,rrrÚassertNotSignaledIsÿzTestEvent.assertNotSignaledcCsft dddd¡}| |¡t dddd¡}| |¡| |¡t dddd¡}| |¡| |¡dS)NFT)rr$r.r-r,rrrÚtestCreateEventNs    zTestEvent.testCreateEventcCsXt dddd¡}| |¡t |¡}| |d¡| |¡| ¡| tj tj|¡dS)NTF) rr$r.ZSetEventr r-rrrrr%rrrÚ testSetEventXs    zTestEvent.testSetEventcCsXt dddd¡}| |¡t |¡}| |d¡| |¡| ¡| tj tj|¡dS)NT) rr$r-Z ResetEventr r.rrrrr%rrrÚtestResetEventas    zTestEvent.testResetEventN)rrrr-r.r/r0r1rrrrr+Cs   r+c@seZdZdd„ZdS)Ú TestMutexcCs\t ddd¡}t |¡}| |d¡t |d¡}| |tj¡| ¡| tj tj|¡dS)NTr) rZ CreateMutexZ ReleaseMutexr rr rrrr)r Zmutexr"rrrÚtestReleaseMutexls   zTestMutex.testReleaseMutexN)rrrr3rrrrr2ksr2Ú__main__) ZunittestrrZTestCaserrr+r2rÚmainrrrrÚs$(