diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-09-08 23:38:42 +0000 |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2008-09-08 23:38:42 +0000 |
commit | 631be01252d99e14ec8632ccb6ee898d11345d22 (patch) | |
tree | d5b33f2eebf9dd4b5b2ab2c94a7fa414ebc25d87 /Lib/test/test_imp.py | |
parent | 74ce88fd67465bf3386b3358aa120e29b75d5353 (diff) | |
download | cpython-git-631be01252d99e14ec8632ccb6ee898d11345d22.tar.gz |
Issue #3806: LockTests in test_imp should be skipped when thread is not available.
Reviewed by Benjamin Peterson.
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r-- | Lib/test/test_imp.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 513ca60884..c9682ab59c 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -56,10 +56,16 @@ class ReloadTests(unittest.TestCase): def test_main(): - test_support.run_unittest( - LockTests, - ReloadTests, - ) + tests = [ + ReloadTests, + ] + try: + import thread + except ImportError: + pass + else: + tests.append(LockTests) + test_support.run_unittest(*tests) if __name__ == "__main__": test_main() |