Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/twisted_8_1/twisted/test/mock_win32process.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2007-2008 Twisted Matrix Laboratories.
2 # See LICENSE for details.
3
4 """
5 This is a mock win32process module.
6
7 The purpose of this module is mock process creation for the PID test.
8
9 CreateProcess(...) will spawn a process, and always return a PID of 42.
10 """
11
12 import win32process
13 GetExitCodeProcess = win32process.GetExitCodeProcess
14 STARTUPINFO = win32process.STARTUPINFO
15
16 STARTF_USESTDHANDLES = win32process.STARTF_USESTDHANDLES
17
18
19 def CreateProcess(appName,
20 cmdline,
21 procSecurity,
22 threadSecurity,
23 inheritHandles,
24 newEnvironment,
25 env,
26 workingDir,
27 startupInfo):
28 """
29 This function mocks the generated pid aspect of the win32.CreateProcess
30 function.
31 - the true win32process.CreateProcess is called
32 - return values are harvested in a tuple.
33 - all return values from createProcess are passed back to the calling
34 function except for the pid, the returned pid is hardcoded to 42
35 """
36
37 hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(
38 appName,
39 cmdline,
40 procSecurity,
41 threadSecurity,
42 inheritHandles,
43 newEnvironment,
44 env,
45 workingDir,
46 startupInfo)
47 dwPid = 42
48 return (hProcess, hThread, dwPid, dwTid)
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/test/iosim.py ('k') | third_party/twisted_8_1/twisted/test/myrebuilder1.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698