From 069488d2795a28a939b1f94153c90f19e3888226 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 15 Nov 2010 18:25:24 +0000 Subject: Hack to avoid test_tempfile failures when run after test_threaded_import (only needed on 3.1) --- Lib/test/test_threaded_import.py | 4 ++++ 1 file changed, 4 insertions(+) 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') -- cgit v0.12