mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-131453: Add additional constants to winsound module (GH-131454)
This commit is contained in:
parent
a2ea417578
commit
00a9844888
4 changed files with 81 additions and 1 deletions
|
@ -82,6 +82,18 @@ class MessageBeepTest(unittest.TestCase):
|
|||
def test_question(self):
|
||||
safe_MessageBeep(winsound.MB_ICONQUESTION)
|
||||
|
||||
def test_error(self):
|
||||
safe_MessageBeep(winsound.MB_ICONERROR)
|
||||
|
||||
def test_information(self):
|
||||
safe_MessageBeep(winsound.MB_ICONINFORMATION)
|
||||
|
||||
def test_stop(self):
|
||||
safe_MessageBeep(winsound.MB_ICONSTOP)
|
||||
|
||||
def test_warning(self):
|
||||
safe_MessageBeep(winsound.MB_ICONWARNING)
|
||||
|
||||
def test_keyword_args(self):
|
||||
safe_MessageBeep(type=winsound.MB_OK)
|
||||
|
||||
|
@ -161,6 +173,15 @@ class PlaySoundTest(unittest.TestCase):
|
|||
# does not raise on systems without a sound card.
|
||||
winsound.PlaySound(None, winsound.SND_PURGE)
|
||||
|
||||
def test_sound_sentry(self):
|
||||
safe_PlaySound("SystemExit", winsound.SND_ALIAS | winsound.SND_SENTRY)
|
||||
|
||||
def test_sound_sync(self):
|
||||
safe_PlaySound("SystemExit", winsound.SND_ALIAS | winsound.SND_SYNC)
|
||||
|
||||
def test_sound_system(self):
|
||||
safe_PlaySound("SystemExit", winsound.SND_ALIAS | winsound.SND_SYSTEM)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue