Discussion:
[Python-3000-checkins] r66334 - python/branches/py3k/Lib/test/test_imp.py
hirokazu.yamamoto
2008-09-09 07:33:28 UTC
Permalink
Author: hirokazu.yamamoto
Date: Tue Sep 9 09:33:27 2008
New Revision: 66334

Log:
Issue #3806: LockTests in test_imp should be skipped when thread is not available.
Reviewed by Benjamin Peterson.

Modified:
python/branches/py3k/Lib/test/test_imp.py

Modified: python/branches/py3k/Lib/test/test_imp.py
==============================================================================
--- python/branches/py3k/Lib/test/test_imp.py (original)
+++ python/branches/py3k/Lib/test/test_imp.py Tue Sep 9 09:33:27 2008
@@ -85,10 +85,16 @@


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...