test.support.EnvironmentVarGuard

class test.support.EnvironmentVarGuard

Class used to temporarily set or unset environment variables. Instances can be used as a context manager and have a complete dictionary interface for querying/modifying the underlying os.environ. After exit from the context manager all changes to environment variables done through this instance will be rolled back.

Changed in version 3.1: Added dictionary interface.

doc_python
2016-10-07 17:44:23
Comments
Leave a Comment

Please login to continue.