diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2005-03-03 09:24:05 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2005-03-03 09:24:05 (GMT) |
commit | 2d2a32f0171da07ce083ee1610417cc5951a7858 (patch) | |
tree | e949a1313e8089abb600731570ec4e21e4c1b287 /Lib/test | |
parent | 98e7508080ca6a467018db7866998381660cfc78 (diff) | |
download | cpython-2d2a32f0171da07ce083ee1610417cc5951a7858.zip cpython-2d2a32f0171da07ce083ee1610417cc5951a7858.tar.gz cpython-2d2a32f0171da07ce083ee1610417cc5951a7858.tar.bz2 |
Clear internal call error in 'L' format. Fixes #723201.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_capi.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 1dd2461..7196b7b 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -1,7 +1,7 @@ # Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. -import sys +import sys, unittest from test import test_support import _testcapi @@ -35,6 +35,12 @@ def TestThreadState(): raise test_support.TestFailed, \ "Couldn't find main thread correctly in the list" +# Tests which use _testcapi helpers +class OtherTests(unittest.TestCase): + def test_exc_L(self): + # This used to raise a SystemError(bad internal call) + self.assertRaises(TypeError, _testcapi.getargs_L, "String") + try: _testcapi._test_thread_state have_thread_state = True @@ -46,3 +52,9 @@ if have_thread_state: import threading t=threading.Thread(target=TestThreadState) t.start() + +def test_main(): + test_support.run_unittest(OtherTests) + +if __name__=='__main__': + test_main() |