Issue #3806: LockTests in test_imp should be skipped when thread is not available.
Reviewed by Benjamin Peterson.
This commit is contained in:
parent
74ce88fd67
commit
631be01252
|
@ -56,10 +56,16 @@ class ReloadTests(unittest.TestCase):
|
||||||
|
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
test_support.run_unittest(
|
tests = [
|
||||||
LockTests,
|
|
||||||
ReloadTests,
|
ReloadTests,
|
||||||
)
|
]
|
||||||
|
try:
|
||||||
|
import thread
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
tests.append(LockTests)
|
||||||
|
test_support.run_unittest(*tests)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
test_main()
|
test_main()
|
||||||
|
|
Loading…
Reference in New Issue