(self)
| 1743 | @unittest.skipUnless(hasattr(subprocess, '_winapi'), |
| 1744 | 'need subprocess._winapi') |
| 1745 | def test_wait_negative_timeout(self): |
| 1746 | proc = subprocess.Popen(ZERO_RETURN_CMD) |
| 1747 | with proc: |
| 1748 | patch = mock.patch.object( |
| 1749 | subprocess._winapi, |
| 1750 | 'WaitForSingleObject', |
| 1751 | return_value=subprocess._winapi.WAIT_OBJECT_0) |
| 1752 | with patch as mock_wait: |
| 1753 | proc.wait(-1) # negative timeout |
| 1754 | mock_wait.assert_called_once_with(proc._handle, 0) |
| 1755 | proc.returncode = None |
| 1756 | |
| 1757 | self.assertEqual(proc.wait(), 0) |
| 1758 | |
| 1759 | def test_post_timeout_communicate_sends_input(self): |
| 1760 | """GH-141473 regression test; the stdin pipe must close""" |
nothing calls this directly
no test coverage detected