(self, args=(), disable_stdout=True, disable_stderr=True)
| 121 | """Temporarily set sys.argv.""" |
| 122 | |
| 123 | def __init__(self, args=(), disable_stdout=True, disable_stderr=True): |
| 124 | self.argv = list(("python",) + args) |
| 125 | self.stdout = ClosingStringIO() if disable_stdout else sys.stdout |
| 126 | self.stderr = ClosingStringIO() if disable_stderr else sys.stderr |
| 127 | |
| 128 | def __enter__(self): # noqa: D105 |
| 129 | self.orig_argv = sys.argv |
nothing calls this directly
no test coverage detected