[Python-checkins] python/dist/src/Lib/test test_dummy_thread.py,1.5,1.6

bcannon@users.sourceforge.net bcannon@users.sourceforge.net
2003年6月13日 16:56:34 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv17013/Lib/test
Modified Files:
	test_dummy_thread.py 
Log Message:
Cause calling interrupt_main in main thread raise KeyboardInterrupt instantly.
Index: test_dummy_thread.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_dummy_thread.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_dummy_thread.py	13 Jun 2003 23:44:35 -0000	1.5
--- test_dummy_thread.py	13 Jun 2003 23:56:32 -0000	1.6
***************
*** 110,113 ****
--- 110,118 ----
 self.failUnlessRaises(KeyboardInterrupt, _thread.start_new_thread,
 call_interrupt, tuple())
+ 
+ def test_interrupt_in_main(self):
+ # Make sure that if interrupt_main is called in main threat that
+ # KeyboardInterrupt is raised instantly.
+ self.failUnlessRaises(KeyboardInterrupt, _thread.interrupt_main)
 
 class ThreadTests(unittest.TestCase):

AltStyle によって変換されたページ (->オリジナル) /