def testLeakFd(self): """ Make sure that nothing leaks """ openFdNum = lambda: len(misc.getfds()) openFds = openFdNum() self.testStdOut() import gc gc.collect() self.assertEquals(len(gc.garbage), 0) self.assertEquals(openFdNum(), openFds)
def testLeakFd(self): """ Make sure that nothing leaks """ import gc openFdNum = lambda: len(misc.getfds()) gc.collect() openFds = openFdNum() self.testStdOut() gc.collect() self.assertEquals(len(gc.garbage), 0) self.assertEquals(openFdNum(), openFds)