(self, mock_sys)
| 1607 | |
| 1608 | @patch("invoke.runners.sys") |
| 1609 | def replaced_stdin_objects_dont_explode(self, mock_sys): |
| 1610 | # Replace sys.stdin with an object lacking .isatty(), which |
| 1611 | # normally causes an AttributeError unless we are being careful. |
| 1612 | mock_sys.stdin = object() |
| 1613 | # Test. If bug is present, this will error. |
| 1614 | runner = Local(Context()) |
| 1615 | assert runner.should_use_pty(pty=True, fallback=True) is False |
| 1616 | |
| 1617 | @mock_pty(trailing_error=OSError("Input/output error")) |
| 1618 | def spurious_OSErrors_handled_gracefully(self): |
nothing calls this directly
no test coverage detected