mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
24 lines
574 B
Python
24 lines
574 B
Python
![]() |
"""
|
||
|
Tests for pyDia
|
||
|
"""
|
||
|
|
||
|
import unittest
|
||
|
import target
|
||
|
import pykd
|
||
|
|
||
|
class DiaTest( unittest.TestCase ):
|
||
|
def testFind(self):
|
||
|
globalScope = pykd.diaOpenPdb( str(target.module.pdb()) )
|
||
|
|
||
|
self.assertNotEqual(0, len(globalScope))
|
||
|
|
||
|
symFunction = globalScope.find("FuncWithName0")
|
||
|
self.assertTrue(1 == len( symFunction ))
|
||
|
|
||
|
symFunction = globalScope.findEx(pykd.SymTagNull,
|
||
|
"FuNc*Name?",
|
||
|
pykd.nsCaseInRegularExpression)
|
||
|
self.assertTrue(len(symFunction) > 1)
|
||
|
|
||
|
|