def addTZCleanup(testCase):
 tzIn = environ.get('TZ', None)
 @testCase.addCleanup
 def resetTZ():
  setTZ(tzIn)

def addTZCleanup ( testCase ) : tzIn = environ . get ( 'TZ' , None ) @ testCase . addCleanup def resetTZ ( ) : setTZ ( tzIn )
add cleanup hooks to a test case to reset timezone to original value .