'Change the Python environment back to what it was before the test was
started.'

def unsetEnvironment(self):

    invalidateImportCaches()
    sys.modules.clear()
    sys.modules.update(self.savedModules)
    sys.path[:] = self.savedPath
