Run pytest using pexpect. This makes sure to use the right pytest and sets up the temporary directory locations. The pexpect child is returned.
(self, string: str, expect_timeout: float = 10.0)
| 1521 | return self.run(*args, timeout=timeout) |
| 1522 | |
| 1523 | def spawn_pytest(self, string: str, expect_timeout: float = 10.0) -> pexpect.spawn: |
| 1524 | class="st">"""Run pytest using pexpect. |
| 1525 | |
| 1526 | This makes sure to use the right pytest and sets up the temporary |
| 1527 | directory locations. |
| 1528 | |
| 1529 | The pexpect child is returned. |
| 1530 | class="st">""" |
| 1531 | basetemp = self.path / class="st">"temp-pexpect" |
| 1532 | basetemp.mkdir(mode=0o700) |
| 1533 | invoke = class="st">" ".join(map(str, self._getpytestargs())) |
| 1534 | cmd = fclass="st">"{invoke} --basetemp={basetemp} {string}" |
| 1535 | return self.spawn(cmd, expect_timeout=expect_timeout) |
| 1536 | |
| 1537 | def spawn(self, cmd: str, expect_timeout: float = 10.0) -> pexpect.spawn: |
| 1538 | class="st">"""Run a command using pexpect. |
no test coverage detected