def tearDown(self): self.removeTrackedTempFiles() if settings.isVerbose(): print >> sys.stderr, '\n>>> END: %s <<<' % str(self) unittest.TestCase.tearDown(self)
elif tp_name + 'Ptr' in typeStats: companionTypeName = tp_name + 'Ptr' companionStats = typeStats[companionTypeName] if doStatsOffset(companionStats): pr('%s offset by companion %s' % ( tp_name.ljust(40), companionTypeName )) continue pr('%s (%s)' % (tp_name.ljust(50), str(tp_allocs - tp_frees).rjust(7))) pr(DIVIDER_1) sys.stderr.flush() # pr prints unconditionally; pv only if verbosity is on. def pr(obj): print >> sys.stderr, obj if settings.isVerbose(): def pv(obj): print >> sys.stderr, obj else: def pv(obj): pass if __name__ == '__main__': main()
def setUp(self): if settings.isVerbose(): print >> sys.stderr, '\n>>> BEGIN: %s <<<' % str(self) unittest.TestCase.setUp(self)