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

doerwalter@users.sourceforge.net doerwalter@users.sourceforge.net
2003年6月30日 04:57:54 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv10956/Lib/test
Modified Files:
	test_winsound.py 
Log Message:
Don't require that a RuntimeError is raised when playing a second
sound while the first one is still running, as the first one
one might already have finished.
Fixes part of SF bug #763052.
Index: test_winsound.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_winsound.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_winsound.py	18 May 2003 00:47:46 -0000	1.5
--- test_winsound.py	30 Jun 2003 11:57:52 -0000	1.6
***************
*** 89,97 ****
 )
 time.sleep(0.5)
! self.assertRaises(
! RuntimeError,
! winsound.PlaySound,
! 'SystemQuestion', winsound.SND_ALIAS | winsound.SND_NOSTOP
! )
 winsound.PlaySound(None, winsound.SND_PURGE)
 
--- 89,101 ----
 )
 time.sleep(0.5)
! try:
! winsound.PlaySound(
! 'SystemQuestion',
! winsound.SND_ALIAS | winsound.SND_NOSTOP
! )
! except RuntimeError:
! pass
! else: # the first sound might already be finished
! pass
 winsound.PlaySound(None, winsound.SND_PURGE)
 

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