(self, out="", err="", exit=0, isatty=None, autostart=True)
| 109 | |
| 110 | class MockSubprocess: |
| 111 | def __init__(self, out="", err="", exit=0, isatty=None, autostart=True): |
| 112 | self.out_file = BytesIO(out.encode()) |
| 113 | self.err_file = BytesIO(err.encode()) |
| 114 | self.exit = exit |
| 115 | self.isatty = isatty |
| 116 | if autostart: |
| 117 | self.start() |
| 118 | |
| 119 | def start(self): |
| 120 | # Start patchin' |