def unittest_verbosity():
    """Return the verbosity setting of the currently running unittest
    program, or 0 if none is running.
    """
frame = inspect.currentframe()
while frame:
    self = frame.f_locals.get('self')
if isinstance(self, unittest.TestProgram):
    return self.verbosity
frame = frame.f_back
return 0
how to access the unittest.main(verbosity) setting in a unittest.TestCase