diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 (GMT) |
commit | 3add4d78ff9f5de02e2c0de09efe9a9b5317539f (patch) | |
tree | c61c6a122b33537814bcc643300f10759fa81010 /Lib/test/test_capi.py | |
parent | e0281cab810c30a23cf2490704e0f85aa4751e83 (diff) | |
download | cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.zip cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.gz cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.bz2 |
Raise statement normalization in Lib/test/.
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r-- | Lib/test/test_capi.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 074f581..107d4b4 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -12,10 +12,7 @@ def test_main(): test = getattr(_testcapi, name) if test_support.verbose: print("internal", name) - try: - test() - except _testcapi.error: - raise test_support.TestFailed, sys.exc_info()[1] + test() # some extra thread-state tests driven via _testcapi def TestThreadState(): @@ -35,8 +32,8 @@ def test_main(): time.sleep(1) # Check our main thread is in the list exactly 3 times. if idents.count(thread.get_ident()) != 3: - raise test_support.TestFailed, \ - "Couldn't find main thread correctly in the list" + raise test_support.TestFailed( + "Couldn't find main thread correctly in the list") try: _testcapi._test_thread_state |