mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
PlaySoundTest.test_alias_nofallback(): Simplified the coding by using
assertRaises. NOT a bugfix candidate.
This commit is contained in:
parent
086e56205c
commit
b8b60ea0c9
1 changed files with 2 additions and 7 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue