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

Side by Side Diff: third_party/twisted_8_1/twisted/test/process_tester.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 """Test program for processes."""
2
3 import sys, os
4
5 test_file_match = "process_test.log.*"
6 test_file = "process_test.log.%d" % os.getpid()
7
8 def main():
9 f = open(test_file, 'wb')
10
11 # stage 1
12 bytes = sys.stdin.read(4)
13 f.write("one: %r\n" % bytes)
14 # stage 2
15 sys.stdout.write(bytes)
16 sys.stdout.flush()
17 os.close(sys.stdout.fileno())
18
19 # and a one, and a two, and a...
20 bytes = sys.stdin.read(4)
21 f.write("two: %r\n" % bytes)
22
23 # stage 3
24 sys.stderr.write(bytes)
25 sys.stderr.flush()
26 os.close(sys.stderr.fileno())
27
28 # stage 4
29 bytes = sys.stdin.read(4)
30 f.write("three: %r\n" % bytes)
31
32 # exit with status code 23
33 sys.exit(23)
34
35
36 if __name__ == '__main__':
37 main()
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/test/process_stdinreader.py ('k') | third_party/twisted_8_1/twisted/test/process_tty.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698