[issue15746] test_winsound bombing out on 2003 buildslave

Trent Nelson report at bugs.python.org
Wed Aug 22 08:40:15 CEST 2012


Trent Nelson added the comment:

Affirmative:


E:\Apps\activestate-python-2.7.2.5-x86>python
ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import test.test_winsound
>>> test.test_winsound._have_soundcard()
False
>>> import winsound
>>> winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS | winsound.SND_NODEFAULT)
>>>

No exception raised.  (No sound is played, either, FWIW.)

I like the approach taken by the method before test_alias_nofallback():

    def test_alias_fallback(self):
        # This test can't be expected to work on all systems.  The MS
        # PlaySound() docs say:
        #
        #     If it cannot find the specified sound, PlaySound uses the
        #     default system event sound entry instead.  If the function
        #     can find neither the system default entry nor the default
        #     sound, it makes no sound and returns FALSE.
        #
        # It's known to return FALSE on some real systems.

        # winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS)
        return

I suspect that'll solve all our problems ;-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15746>
_______________________________________


More information about the Python-bugs-list mailing list