[Python-checkins] r80213 - python/branches/release26-maint/Lib/test/test_winsound.py
Brian Curtin
brian.curtin at gmail.com
Mon Apr 19 17:29:35 CEST 2010
On Mon, Apr 19, 2010 at 10:18, victor.stinner <python-checkins at python.org>wrote:
> Author: victor.stinner
> Date: Mon Apr 19 17:18:07 2010
> New Revision: 80213
>
> Log:
> test_winsound: new try to skip the tests. In Python 2.6, TestSkipped is
> used to
> skip the whole file, not a particular function.
>
>
> Modified:
> python/branches/release26-maint/Lib/test/test_winsound.py
>
> Modified: python/branches/release26-maint/Lib/test/test_winsound.py
>
> ==============================================================================
> --- python/branches/release26-maint/Lib/test/test_winsound.py (original)
> +++ python/branches/release26-maint/Lib/test/test_winsound.py Mon Apr 19
> 17:18:07 2010
> @@ -97,7 +97,8 @@
>
> def test_alias_asterisk(self):
> if not has_sound("SystemAsterisk"):
> - raise test_support.TestSkipped("No default SystemAsterisk")
> + print "No default SystemAsterisk"
> + return
> if _have_soundcard():
> winsound.PlaySound('SystemAsterisk', winsound.SND_ALIAS)
> else:
> @@ -109,7 +110,8 @@
>
> def test_alias_exclamation(self):
> if not has_sound("SystemExclamation"):
> - raise test_support.TestSkipped("No default SystemExclamation")
> + print "No default SystemExclamation"
> + return
> if _have_soundcard():
> winsound.PlaySound('SystemExclamation', winsound.SND_ALIAS)
> else:
> @@ -121,7 +123,8 @@
>
> def test_alias_exit(self):
> if not has_sound("SystemExit"):
> - raise test_support.TestSkipped("No default SystemExit")
> + print "No default SystemExit"
> + return
> if _have_soundcard():
> winsound.PlaySound('SystemExit', winsound.SND_ALIAS)
> else:
> @@ -133,7 +136,8 @@
>
> def test_alias_hand(self):
> if not has_sound("SystemHand"):
> - raise test_support.TestSkipped("No default SystemHand")
> + print "No default SystemHand"
> + return
> if _have_soundcard():
> winsound.PlaySound('SystemHand', winsound.SND_ALIAS)
> else:
> @@ -145,7 +149,8 @@
>
> def test_alias_question(self):
> if not has_sound("SystemQuestion"):
> - raise test_support.TestSkipped("No default SystemQuestion")
> + print "No default SystemQuestion"
> + return
> if _have_soundcard():
> winsound.PlaySound('SystemQuestion', winsound.SND_ALIAS)
> else:
>
FYI: These changes will cause the test to fail due to unexpected output when
run through test.regrtest.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-checkins/attachments/20100419/fe9abc8c/attachment.html>
More information about the Python-checkins
mailing list