]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport Tim's fix to test_winsound.py
authorRaymond Hettinger <python@rcn.com>
Mon, 22 Sep 2003 19:14:49 +0000 (19:14 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 22 Sep 2003 19:14:49 +0000 (19:14 +0000)
PlaySoundTest.test_alias_fallback():  Disabled this test, and explained
why in a new comment.  My home Win98SE box is one of the "real systems"
alluded to (my system "default sound" appears to have vanished sometime
in the last month, that's certainly not a Python bug, and the MS
PlaySound docs are correct in their explanation of what happens then).

Lib/test/test_winsound.py

index 7e1459947ae30ce4f3cee93571841a5e40ff5918..abe67274a85b4575ca56f93561969e9e55b51aaa 100644 (file)
@@ -71,7 +71,18 @@ class PlaySoundTest(unittest.TestCase):
         winsound.PlaySound('SystemQuestion', winsound.SND_ALIAS)
 
     def test_alias_fallback(self):
-        winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS)
+        # 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
 
     def test_alias_nofallback(self):
         try: