Lines Matching defs:mock
2 from unittest import mock
1482 with unittest.mock.patch.object(subprocess.Popen, '_execute_child'):
1557 @mock.patch("subprocess._fork_exec")
1565 with mock.patch.object(subprocess, '_USE_VFORK', False):
1835 # We mock the __del__ method for Popen in the next two tests
1846 @mock.patch("subprocess._fork_exec")
1858 with mock.patch("subprocess.os.waitpid",
1863 @mock.patch("subprocess._fork_exec")
1878 with mock.patch("subprocess.os.waitpid",
3223 # that just calls _stdin_write() internally due to our mock.
3225 with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin:
3232 # that just calls _stdin_write() internally due to our mock.
3234 with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin:
3246 with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin, \
3261 with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin:
3279 with mock.patch('subprocess.os.waitpid', return_value=(proc.pid, status)):
3295 with mock.patch("os.kill") as mock_kill:
3315 with mock.patch.object(p, 'poll', new=lambda: None):
3596 @mock.patch.object(subprocess.Popen, "_communicate")
3609 with mock.patch.object(subprocess.Popen, "_wait") as mock__wait:
3613 with mock.patch.object(subprocess, "Popen",
3622 call, mock.call(timeout=None),
3627 if call == mock.call(timeout=0.25): # from Popen.__init__