This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Patch - skip winsound tests if no default sound is configured
Type: behavior Stage: resolved
Components: Tests, Windows Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brian.curtin Nosy List: benjamin.peterson, brian.curtin
Priority: normal Keywords: needs review, patch

Created on 2009-11-11 15:38 by brian.curtin, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
winsound_test_skipping.patch brian.curtin, 2009-11-13 15:56 minor cleanup of original patch, r76216
winsound_test_skipping_v2.diff brian.curtin, 2009-12-15 16:11 updated patch against r76850
Messages (6)
msg95140 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2009-11-11 15:37
I noticed test failures on trunk for test_winsound on only one of my
boxes. Everything works fine on XP, but PlaySoundTest test methods fail
on Windows Server 2003.

It appears that on WS2k3 there are no default system sounds configured.
For example, view the difference of the following registry key on an XP
and Server machine:
HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemExit\.Default.

The patch includes a function to figure out if a WAV file is associated
with a particular sound, and unittest.skipIf is used to decorate some
methods to skip if they don't have a configured sound.
msg95181 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2009-11-13 15:56
Minor cleanup of the original patch
msg96303 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2009-12-12 19:28
Removing versions that this wouldn't apply to if it were accepted.
msg96312 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-12-13 01:01
You can use unittest.skipUnless instead of skipIf since you have a not
condition in all of them.
msg96443 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2009-12-15 16:11
True, that slipped by me - thanks. 
Updated the patch against r76850.
msg103004 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-04-13 02:40
Committed in r80026-r80029.
History
Date User Action Args
2022-04-11 14:56:54adminsetgithub: 51555
2010-04-13 02:40:50brian.curtinsetstatus: open -> closed
messages: + msg103004

assignee: brian.curtin
resolution: fixed
stage: patch review -> resolved
2010-01-13 02:05:59brian.curtinsetpriority: normal
keywords: + needs review
stage: patch review
2009-12-15 16:11:56brian.curtinsetfiles: + winsound_test_skipping_v2.diff

messages: + msg96443
2009-12-13 01:01:12benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg96312
2009-12-12 19:28:33brian.curtinsetmessages: + msg96303
versions: + Python 3.2, - Python 2.6, Python 3.0, Python 3.1
2009-11-13 15:56:15brian.curtinsetfiles: + winsound_test_skipping.patch

messages: + msg95181
2009-11-13 15:55:11brian.curtinsetfiles: - winsound_test_skipping.patch
2009-11-11 15:38:01brian.curtincreate