mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 19:53:22 +08:00
26 lines
549 B
Python
26 lines
549 B
Python
|
|
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
|
|
|
|
def onExecutionStatusChange(self,status):
|
|
print status
|
|
|
|
class EventTest( unittest.TestCase ):
|
|
|
|
def testDebugBreak( self ):
|
|
h = handler()
|
|
pykd.go()
|
|
pykd.go()
|
|
self.assertEqual( 2, h.counter )
|