From cf1c1c5aca940b36c9f24913e22c3b67fe8bf7b8 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Mon, 7 Nov 2011 05:32:27 +0000 Subject: [PATCH] [0.1.x] added : eventtest.py git-svn-id: https://pykd.svn.codeplex.com/svn@71144 9b283d60-5439-405e-af05-b73fd8c4d996 --- test/scripts/eventtest.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/scripts/eventtest.py diff --git a/test/scripts/eventtest.py b/test/scripts/eventtest.py new file mode 100644 index 0000000..9f0f47b --- /dev/null +++ b/test/scripts/eventtest.py @@ -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 )