diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-15 18:25:24 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-15 18:25:24 (GMT) |
commit | 069488d2795a28a939b1f94153c90f19e3888226 (patch) | |
tree | 2b4a54405c8cd44233948852e9d76d23fbb7835e /Lib | |
parent | 3a72b250eb63d5bafda8da8dba1bf6b90ec381c6 (diff) | |
download | cpython-069488d2795a28a939b1f94153c90f19e3888226.zip cpython-069488d2795a28a939b1f94153c90f19e3888226.tar.gz cpython-069488d2795a28a939b1f94153c90f19e3888226.tar.bz2 |
Hack to avoid test_tempfile failures when run after test_threaded_import
(only needed on 3.1)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_threaded_import.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_threaded_import.py b/Lib/test/test_threaded_import.py index 7791935..e4d1882 100644 --- a/Lib/test/test_threaded_import.py +++ b/Lib/test/test_threaded_import.py @@ -10,6 +10,10 @@ import imp import sys import time import shutil +# HACK: preloading tempfile is necessary to avoid failures when test_tempfile +# is run after test_threaded_import. This has to do with dark secrets of +# the import machinery and phantom copies of the random module. +import tempfile import unittest from test.support import verbose, import_module, run_unittest, TESTFN thread = import_module('_thread') |