Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(19)  |  Call(13)  |  Derive(0)  |  Import(6)

src/c/o/comtypes-1.0.0/comtypes/test/test_collections.py   comtypes(Download)
import unittest
from comtypes.client import CreateObject, GetModule #, Constants
from ctypes import ArgumentError
 
from comtypes.test.find_memleak import find_memleak
            for item in iter(apps):
                item.ProcessImageFileName
        bytes = find_memleak(doit, (2, 20))
        self.failIf(bytes, "Leaks %d bytes" % bytes)
 
        def doit():
            iter(apps).Next(99)
        bytes = find_memleak(doit, (2, 20))
        self.failIf(bytes, "Leaks %d bytes" % bytes)
 
                for what in iter(apps):
                    pass
        bytes = find_memleak(doit, (2, 20))
        self.failIf(bytes, "Leaks %d bytes" % bytes)
 

src/c/o/comtypes-1.0.0/comtypes/test/test_urlhistory.py   comtypes(Download)
        return result
 
from comtypes.test.find_memleak import find_memleak
 
class Test(unittest.TestCase):
    def check_leaks(self, func):
        bytes = find_memleak(func, (5, 10))

src/c/o/comtypes-1.0.0/comtypes/test/test_safearray.py   comtypes(Download)
from ctypes import *
from ctypes.wintypes import BOOL
from comtypes.test.find_memleak import find_memleak
from comtypes import BSTR, IUnknown
from comtypes.test import is_resource_enabled, get_numpy
            v = VARIANT((1, 2, 3), ("foo", "bar", None))
 
        bytes = find_memleak(func)
        self.failIf(bytes, "Leaks %d bytes" % bytes)
 
            v = VARIANT(array.array("d", (3.14, 2.78)))
 
        bytes = find_memleak(func)
        self.failIf(bytes, "Leaks %d bytes" % bytes)
 
            return v.value
 
        bytes = find_memleak(func)
        self.failIf(bytes, "Leaks %d bytes" % bytes)
 
            sb.from_param(["foo", "bar"])
 
        bytes = find_memleak(doit)
        self.failIf(bytes, "Leaks %d bytes" % bytes)
 

src/c/o/comtypes-1.0.0/comtypes/test/test_comserver.py   comtypes(Download)
from comtypes.server.register import register#, unregister
from comtypes.test import is_resource_enabled
from comtypes.test.find_memleak import find_memleak
 
################################################################
    def _find_memleak(self, func):
        bytes = find_memleak(func)
        self.failIf(bytes, "Leaks %d bytes" % bytes)
 
    def test_mixedinout(self):

src/c/o/comtypes-1.0.0/comtypes/test/test_BSTR.py   comtypes(Download)
##requires("memleaks")
 
from comtypes.test.find_memleak import find_memleak
 
class Test(unittest.TestCase):
    def check_leaks(self, func, limit=0):
        bytes = find_memleak(func)

src/c/o/comtypes-1.0.0/comtypes/test/test_avmc.py   comtypes(Download)
import unittest
from comtypes.client import CreateObject
from comtypes.test.find_memleak import find_memleak
 
class Test(unittest.TestCase):
    def check_leaks(self, func, limit=0):
        bytes = find_memleak(func)
        self.failIf(bytes > limit, "Leaks %d bytes" % bytes)
 
if __name__ == "__main__":