[Python-checkins] cpython (merge 3.3 -> default): Issue #19987: Merge with 3.3

zach.ware python-checkins at python.org
Mon Dec 16 16:05:56 CET 2013


http://hg.python.org/cpython/rev/1aa6751b298f
changeset: 88001:1aa6751b298f
parent: 87998:1824fa874f08
parent: 88000:5455456945d4
user: Zachary Ware <zachary.ware at gmail.com>
date: Mon Dec 16 09:05:44 2013 -0600
summary:
 Issue #19987: Merge with 3.3
files:
 Lib/test/test_winsound.py | 16 ++++++++--------
 Misc/NEWS | 2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Lib/test/test_winsound.py b/Lib/test/test_winsound.py
--- a/Lib/test/test_winsound.py
+++ b/Lib/test/test_winsound.py
@@ -158,15 +158,15 @@
 )
 
 def test_alias_fallback(self):
- if _have_soundcard():
+ # In the absense of the ability to tell if a sound was actually
+ # played, this test has two acceptable outcomes: success (no error,
+ # sound was theoretically played; although as issue #19987 shows
+ # a box without a soundcard can "succeed") or RuntimeError. Any
+ # other error is a failure.
+ try:
 winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS)
- # see http://bugs.python.org/issue19987
- #else:
- # self.assertRaises(
- # RuntimeError,
- # winsound.PlaySound,
- # '!"$%&/(#+*', winsound.SND_ALIAS
- # )
+ except RuntimeError:
+ pass
 
 def test_alias_nofallback(self):
 if _have_soundcard():
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -199,7 +199,7 @@
 
 - Issue #19572: More skipped tests explicitly marked as skipped.
 
-- Issue #19595: Re-enabled a long-disabled test in test_winsound.
+- Issue #19595, #19987: Re-enabled a long-disabled test in test_winsound.
 
 - Issue #19588: Fixed tests in test_random that were silently skipped most
 of the time. Patch by Julian Gindi.
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /