diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2016-09-06 21:32:43 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2016-09-06 21:32:43 (GMT) |
commit | c401881d689b2ca89211a6ff2cd5ac96150d237d (patch) | |
tree | 49045f3371cd68e0542ea1d57d1b4eba70de3d98 /Lib/test/test_winsound.py | |
parent | ef537db68813ebaae11f54b780f21ad7dac05845 (diff) | |
download | cpython-c401881d689b2ca89211a6ff2cd5ac96150d237d.zip cpython-c401881d689b2ca89211a6ff2cd5ac96150d237d.tar.gz cpython-c401881d689b2ca89211a6ff2cd5ac96150d237d.tar.bz2 |
Closes #27982: Allow keyword arguments to winsound functions
Diffstat (limited to 'Lib/test/test_winsound.py')
-rw-r--r-- | Lib/test/test_winsound.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_winsound.py b/Lib/test/test_winsound.py index 1cfef77..179e069 100644 --- a/Lib/test/test_winsound.py +++ b/Lib/test/test_winsound.py @@ -51,6 +51,10 @@ class BeepTest(unittest.TestCase): for i in range(100, 2000, 100): safe_Beep(i, 75) + def test_keyword_args(self): + safe_Beep(duration=75, frequency=2000) + + class MessageBeepTest(unittest.TestCase): def tearDown(self): @@ -76,6 +80,9 @@ class MessageBeepTest(unittest.TestCase): def test_question(self): safe_MessageBeep(winsound.MB_ICONQUESTION) + def test_keyword_args(self): + safe_MessageBeep(type=winsound.MB_OK) + class PlaySoundTest(unittest.TestCase): @@ -92,6 +99,9 @@ class PlaySoundTest(unittest.TestCase): winsound.SND_MEMORY) self.assertRaises(TypeError, winsound.PlaySound, 1, 0) + def test_keyword_args(self): + safe_PlaySound(flags=winsound.SND_ALIAS, sound="SystemExit") + def test_snd_memory(self): with open(support.findfile('pluck-pcm8.wav', subdir='audiodata'), 'rb') as f: |