test.support.change_cwd(path, quiet=False)
A context manager that temporarily changes the current working directory to path and yields the directory.
If quiet is False, the context manager raises an exception on error. Otherwise, it issues only a warning and keeps the current working directory the same.