[0.1.x] added : eventtest.py

git-svn-id: https://pykd.svn.codeplex.com/svn@71144 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2011-11-07 05:32:27 +00:00 committed by Mikhail I. Izmestev
parent 2dda9580b2
commit cf1c1c5aca

22
test/scripts/eventtest.py Normal file
View File

@ -0,0 +1,22 @@
import unittest
import target
import pykd
class handler( pykd.eventHandler ):
def __init__(self):
pykd.eventHandler.__init__(self)
self.counter=0
def onException(self, param):
self.counter += 1
return pykd.DEBUG_STATUS_NO_CHANGE
class EventTest( unittest.TestCase ):
def testDebugBreak( self ):
h = handler()
pykd.go()
pykd.go()
self.assertEqual( 2, h.counter )