(self, Local)
| 211 | |
| 212 | @patch(local_path) |
| 213 | def cd_should_accept_any_stringable_object(self, Local): |
| 214 | class Path: |
| 215 | def __init__(self, value): |
| 216 | self.value = value |
| 217 | |
| 218 | def __str__(self): |
| 219 | return self.value |
| 220 | |
| 221 | runner = Local.return_value |
| 222 | c = Context() |
| 223 | |
| 224 | with c.cd(Path("foo")): |
| 225 | c.run("whoami") |
| 226 | |
| 227 | cmd = "cd foo && whoami" |
| 228 | assert runner.run.call_args[0][0] == cmd |
| 229 | |
| 230 | class prefix: |
| 231 | @patch(local_path) |