diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-09-22 18:41:53 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-09-22 18:41:53 (GMT) |
commit | b8b60ea0c97d8eea0fde6712b5c9848aa743b47c (patch) | |
tree | a49475958e143a797e9138ed73537f45644ec7be /Lib | |
parent | 086e56205c5b9b172cae5be16ebf09116173c3d9 (diff) | |
download | cpython-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')
-rw-r--r-- | Lib/test/test_winsound.py | 9 |
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( |