Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Side by Side Diff: Lib/test/threaded_import_hangers.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 # This is a helper module for test_threaded_import. The test imports this 1 # This is a helper module for test_threaded_import. The test imports this
2 # module, and this module tries to run various Python library functions in 2 # module, and this module tries to run various Python library functions in
3 # their own thread, as a side effect of being imported. If the spawned 3 # their own thread, as a side effect of being imported. If the spawned
4 # thread doesn't complete in TIMEOUT seconds, an "appeared to hang" message 4 # thread doesn't complete in TIMEOUT seconds, an "appeared to hang" message
5 # is appended to the module-global `errors` list. That list remains empty 5 # is appended to the module-global `errors` list. That list remains empty
6 # if (and only if) all functions tested complete. 6 # if (and only if) all functions tested complete.
7 7
8 TIMEOUT = 10 8 TIMEOUT = 10
9 9
10 import threading 10 import threading
(...skipping 17 matching lines...) Expand all
28 self.function(*self.args) 28 self.function(*self.args)
29 29
30 for name, func, args in [ 30 for name, func, args in [
31 # Bug 147376: TemporaryFile hung on Windows, starting in Python 2.4. 31 # Bug 147376: TemporaryFile hung on Windows, starting in Python 2.4.
32 ("tempfile.TemporaryFile", lambda: tempfile.TemporaryFile().close(), ()) , 32 ("tempfile.TemporaryFile", lambda: tempfile.TemporaryFile().close(), ()) ,
33 33
34 # The real cause for bug 147376: ntpath.abspath() caused the hang. 34 # The real cause for bug 147376: ntpath.abspath() caused the hang.
35 ("os.path.abspath", os.path.abspath, ('.',)), 35 ("os.path.abspath", os.path.abspath, ('.',)),
36 ]: 36 ]:
37 37
38 try: 38 t = Worker(func, args)
39 t = Worker(func, args) 39 t.start()
40 t.start() 40 t.join(TIMEOUT)
41 t.join(TIMEOUT) 41 if t.is_alive():
42 if t.is_alive(): 42 errors.append("%s appeared to hang" % name)
43 errors.append("%s appeared to hang" % name)
44 finally:
45 del t
OLDNEW
« no previous file with comments | « Lib/test/test_zipimport_support.py ('k') | Lib/test/tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+