]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #27748: strengthen test_alias_nofallback
authorZachary Ware <zachary.ware@gmail.com>
Mon, 5 Sep 2016 22:19:35 +0000 (17:19 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Mon, 5 Sep 2016 22:19:35 +0000 (17:19 -0500)
This test should always raise RuntimeError.

Lib/test/test_winsound.py

index 4a8ab7de582c10ed00e95da03773279f058418e2..1295f3a93d569611dc3db4ec77a8ed596dfdb80f 100644 (file)
@@ -104,7 +104,10 @@ class PlaySoundTest(unittest.TestCase):
         safe_PlaySound('!"$%&/(#+*', winsound.SND_ALIAS)
 
     def test_alias_nofallback(self):
-        safe_PlaySound('!"$%&/(#+*', winsound.SND_ALIAS | winsound.SND_NODEFAULT)
+        self.assertRaises(RuntimeError,
+                          winsound.PlaySound,
+                          '!"$%&/(#+*',
+                          winsound.SND_ALIAS | winsound.SND_NODEFAULT)
 
     def test_stopasync(self):
         safe_PlaySound(