(self, key, value)
Set an environment variable and save the original value in the cache.
Set an environment variable and save the original value in the cache.
Set an environment variable and save the original value in the cache .
def set(self, key, value):
        """Set an environment variable and save the original value in the cache."""
        if key in self._saved:
            self.reset(key)
        self._saved[key] = os.environ.get(key)
        os.environ[key] = value
def set ( self , key , value ) : if key in self . _saved : self . reset ( key ) self . _saved [ key ] = os . environ . get ( key ) os . environ [ key ] = value