mirror of https://github.com/python/cpython
Issue #3806: LockTests in test_imp should be skipped when thread is not available.
Reviewed by Benjamin Peterson.
This commit is contained in:
parent
8530e8590f
commit
36144098e3
|
@ -85,10 +85,16 @@ class ImportTests(unittest.TestCase):
|
|||
|
||||
|
||||
def test_main():
|
||||
support.run_unittest(
|
||||
LockTests,
|
||||
ImportTests,
|
||||
)
|
||||
tests = [
|
||||
ImportTests,
|
||||
]
|
||||
try:
|
||||
import _thread
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
tests.append(LockTests)
|
||||
support.run_unittest(*tests)
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
|
|
Loading…
Reference in New Issue