File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,18 +158,14 @@ def test_alias_question(self):
158158 )
159159
160160 def test_alias_fallback (self ):
161- # This test can't be expected to work on all systems. The MS
162- # PlaySound() docs say:
163- #
164- # If it cannot find the specified sound, PlaySound uses the
165- # default system event sound entry instead. If the function
166- # can find neither the system default entry nor the default
167- # sound, it makes no sound and returns FALSE.
168- #
169- # It's known to return FALSE on some real systems.
170-
171- # winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS)
172- return
161+ if _have_soundcard ():
162+ winsound .PlaySound ('!"$%&/(#+*' , winsound .SND_ALIAS )
163+ else :
164+ self .assertRaises (
165+ RuntimeError ,
166+ winsound .PlaySound ,
167+ '!"$%&/(#+*' , winsound .SND_ALIAS
168+ )
173169
174170 def test_alias_nofallback (self ):
175171 if _have_soundcard ():
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ Library
3131Tests
3232-----
3333
34+ - Issue #19595: Re-enabled a long-disabled test in test_winsound.
35+
3436- Issue #19588: Fixed tests in test_random that were silently skipped most
3537 of the time. Patch by Julian Gindi.
3638
You can’t perform that action at this time.
0 commit comments