summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_winsound.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-11-28 05:56:04 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-11-28 05:56:04 (GMT)
commit50a5dad608eb4e582a30726c2214b6578d6e11db (patch)
treeed9e081c90273676a65299fff6ace7e5c590da11 /Lib/test/test_winsound.py
parent23bdd83053dea5c6da39dfb673e819d39557ef2a (diff)
downloadcpython-50a5dad608eb4e582a30726c2214b6578d6e11db.zip
cpython-50a5dad608eb4e582a30726c2214b6578d6e11db.tar.gz
cpython-50a5dad608eb4e582a30726c2214b6578d6e11db.tar.bz2
Issue #19595: Re-enable a long-disabled test in test_winsound
Diffstat (limited to 'Lib/test/test_winsound.py')
-rw-r--r--Lib/test/test_winsound.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/Lib/test/test_winsound.py b/Lib/test/test_winsound.py
index 61d864a..d8a617e 100644
--- a/Lib/test/test_winsound.py
+++ b/Lib/test/test_winsound.py
@@ -158,18 +158,14 @@ class PlaySoundTest(unittest.TestCase):
)
def test_alias_fallback(self):
- # This test can't be expected to work on all systems. The MS
- # PlaySound() docs say:
- #
- # If it cannot find the specified sound, PlaySound uses the
- # default system event sound entry instead. If the function
- # can find neither the system default entry nor the default
- # sound, it makes no sound and returns FALSE.
- #
- # It's known to return FALSE on some real systems.
-
- # winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS)
- return
+ if _have_soundcard():
+ winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS)
+ else:
+ self.assertRaises(
+ RuntimeError,
+ winsound.PlaySound,
+ '!"$%&/(#+*', winsound.SND_ALIAS
+ )
def test_alias_nofallback(self):
if _have_soundcard():