summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_winsound.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-09-22 18:41:53 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-09-22 18:41:53 (GMT)
commitb8b60ea0c97d8eea0fde6712b5c9848aa743b47c (patch)
treea49475958e143a797e9138ed73537f45644ec7be /Lib/test/test_winsound.py
parent086e56205c5b9b172cae5be16ebf09116173c3d9 (diff)
downloadcpython-b8b60ea0c97d8eea0fde6712b5c9848aa743b47c.zip
cpython-b8b60ea0c97d8eea0fde6712b5c9848aa743b47c.tar.gz
cpython-b8b60ea0c97d8eea0fde6712b5c9848aa743b47c.tar.bz2
PlaySoundTest.test_alias_nofallback(): Simplified the coding by using
assertRaises. NOT a bugfix candidate.
Diffstat (limited to 'Lib/test/test_winsound.py')
-rw-r--r--Lib/test/test_winsound.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/test/test_winsound.py b/Lib/test/test_winsound.py
index abe6727..d9d2892 100644
--- a/Lib/test/test_winsound.py
+++ b/Lib/test/test_winsound.py
@@ -85,13 +85,8 @@ class PlaySoundTest(unittest.TestCase):
return
def test_alias_nofallback(self):
- try:
- winsound.PlaySound(
- '!"$%&/(#+*',
- winsound.SND_ALIAS | winsound.SND_NODEFAULT
- )
- except RuntimeError:
- pass
+ self.assertRaises(RuntimeError, winsound.PlaySound, '!"$%&/(#+*',
+ winsound.SND_ALIAS | winsound.SND_NODEFAULT)
def test_stopasync(self):
winsound.PlaySound(