mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Hack to avoid test_tempfile failures when run after test_threaded_import
(only needed on 3.1)
This commit is contained in:
parent
3a72b250eb
commit
069488d279
1 changed files with 4 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue