6
class ProcessTest(unittest.TestCase):
9
pykd.startProcess( target.appPath )
10
pykd.startProcess( target.appPath )
11
pykd.startProcess( target.appPath )
14
pykd.killAllProcesses()
16
def testGetCurrentProcess(self):
17
proc = pykd.targetProcess.getCurrent()
18
self.assertNotEqual(0, proc.systemID )
19
self.assertNotEqual(0, proc.peb )
21
def testEnumThreads(self):
22
proc = pykd.targetProcess.getCurrent()
23
threadNumber = proc.getNumberThreads()
24
self.assertLess(0, threadNumber)
25
for i in range(threadNumber):
26
thread = proc.getThread(i)
27
self.assertNotEqual(0, thread.systemID )
28
self.assertNotEqual(0, thread.teb )
30
def testEnumProcesses(self):
31
processNumber = pykd.targetProcess.getNumber()
32
for i in range(processNumber):
33
proc = pykd.targetProcess(i)
34
self.assertNotEqual(0, proc.systemID)
35
self.assertNotEqual(0, proc.peb)
37
def testSetCurrentThread(self):
38
proc = pykd.targetProcess.getCurrent()
39
threadNumber = proc.getNumberThreads()
40
self.assertLess(0, threadNumber)
41
for i in range(threadNumber):
42
thread = proc.getThread(i)
45
def testGetBreakpoint(self):
46
proc = pykd.targetProcess.getCurrent()
47
self.assertEqual(0, proc.getNumberBreakpoints())