Lines Matching defs:winsound
1 # Ridiculously simple test of the winsound module for Windows.
12 winsound = import_helper.import_module('winsound')
34 safe_Beep = sound_func(winsound.Beep)
35 safe_MessageBeep = sound_func(winsound.MessageBeep)
36 safe_PlaySound = sound_func(winsound.PlaySound)
42 self.assertRaises(TypeError, winsound.Beep)
43 self.assertRaises(ValueError, winsound.Beep, 36, 75)
44 self.assertRaises(ValueError, winsound.Beep, 32768, 75)
64 self.assertRaises(TypeError, winsound.MessageBeep, "bad")
65 self.assertRaises(TypeError, winsound.MessageBeep, 42, 42)
69 safe_MessageBeep(winsound.MB_OK)
72 safe_MessageBeep(winsound.MB_ICONASTERISK)
75 safe_MessageBeep(winsound.MB_ICONEXCLAMATION)
78 safe_MessageBeep(winsound.MB_ICONHAND)
81 safe_MessageBeep(winsound.MB_ICONQUESTION)
84 safe_MessageBeep(type=winsound.MB_OK)
90 self.assertRaises(TypeError, winsound.PlaySound)
91 self.assertRaises(TypeError, winsound.PlaySound, "bad", "bad")
94 winsound.PlaySound,
95 "none", winsound.SND_ASYNC | winsound.SND_MEMORY
97 self.assertRaises(TypeError, winsound.PlaySound, b"bad", 0)
98 self.assertRaises(TypeError, winsound.PlaySound, "bad",
99 winsound.SND_MEMORY)
100 self.assertRaises(TypeError, winsound.PlaySound, 1, 0)
102 self.assertRaises(ValueError, winsound.PlaySound, 'bad\0', 0)
105 safe_PlaySound(flags=winsound.SND_ALIAS, sound="SystemExit")
111 safe_PlaySound(audio_data, winsound.SND_MEMORY)
113 safe_PlaySound(audio_data, winsound.SND_MEMORY)
117 safe_PlaySound(fn, winsound.SND_FILENAME | winsound.SND_NODEFAULT)
129 safe_PlaySound(alias, winsound.SND_ALIAS)
132 safe_PlaySound('!"$%&/(#+*', winsound.SND_ALIAS)
135 safe_PlaySound('!"$%&/(#+*', winsound.SND_ALIAS | winsound.SND_NODEFAULT)
140 winsound.SND_ALIAS | winsound.SND_ASYNC | winsound.SND_LOOP
143 safe_PlaySound('SystemQuestion', winsound.SND_ALIAS | winsound.SND_NOSTOP)
144 # Issue 8367: PlaySound(None, winsound.SND_PURGE)
146 winsound.PlaySound(None, winsound.SND_PURGE)