summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_winsound.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_winsound.py')
-rw-r--r--Lib/test/test_winsound.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/test/test_winsound.py b/Lib/test/test_winsound.py
index 0d6ddf9..7cdc275 100644
--- a/Lib/test/test_winsound.py
+++ b/Lib/test/test_winsound.py
@@ -27,8 +27,16 @@ class BeepTest(unittest.TestCase):
winsound.Beep(37, 75)
winsound.Beep(32767, 75)
else:
- self.assertRaises(RuntimeError, winsound.Beep, 37, 75)
- self.assertRaises(RuntimeError, winsound.Beep, 32767, 75)
+ # The behaviour of winsound.Beep() seems to differ between
+ # different versions of Windows when there's either a) no
+ # sound card entirely, b) legacy beep driver has been disabled,
+ # or c) the legacy beep driver has been uninstalled. Sometimes
+ # RuntimeErrors are raised, sometimes they're not. Meh.
+ try:
+ winsound.Beep(37, 75)
+ winsound.Beep(32767, 75)
+ except RuntimeError:
+ pass
def test_increasingfrequency(self):
if _have_soundcard():