Issue 7306: Patch - skip winsound tests if no default sound is configured (original) (raw)

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:54 admin set github: 51555
2010-04-13 02:40:50 brian.curtin set status: open -> closedmessages: + assignee: brian.curtinresolution: fixedstage: patch review -> resolved
2010-01-13 02:05:59 brian.curtin set priority: normalkeywords: + needs reviewstage: patch review
2009-12-15 16:11:56 brian.curtin set files: + winsound_test_skipping_v2.diffmessages: +
2009-12-13 01:01:12 benjamin.peterson set nosy: + benjamin.petersonmessages: +
2009-12-12 19:28:33 brian.curtin set messages: + versions: + Python 3.2, - Python 2.6, Python 3.0, Python 3.1
2009-11-13 15:56:15 brian.curtin set files: + winsound_test_skipping.patchmessages: +
2009-11-13 15:55:11 brian.curtin set files: - winsound_test_skipping.patch
2009-11-11 15:38:01 brian.curtin create