diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2013-11-28 05:56:04 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2013-11-28 05:56:04 (GMT) |
commit | 72a01b29bf7ac17de81c294f4ee6e5cc7359c685 (patch) | |
tree | 61393e98fe226dc20f78e0a426548b1cb2d722a5 /Lib/test/test_winsound.py | |
parent | 26d936a71e2aa4da5618c5d6532eac488af00ee4 (diff) | |
download | cpython-72a01b29bf7ac17de81c294f4ee6e5cc7359c685.zip cpython-72a01b29bf7ac17de81c294f4ee6e5cc7359c685.tar.gz cpython-72a01b29bf7ac17de81c294f4ee6e5cc7359c685.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.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Lib/test/test_winsound.py b/Lib/test/test_winsound.py index 7cdecd8..6d8649a 100644 --- a/Lib/test/test_winsound.py +++ b/Lib/test/test_winsound.py @@ -159,18 +159,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(): |