mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[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:
parent
2dda9580b2
commit
cf1c1c5aca
22
test/scripts/eventtest.py
Normal file
22
test/scripts/eventtest.py
Normal 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 )
|
Loading…
Reference in New Issue
Block a user