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.

Author vstinner
Recipients trent, vstinner
Date 2012-08-21.11:46:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345549616.0.0.76252811384.issue15746@psf.upfronthosting.co.za>
In-reply-to
Content
Copy of the test:

    def test_alias_nofallback(self):
        if _have_soundcard():
            # Note that this is not the same as asserting RuntimeError
            # will get raised:  you cannot convert this to
            # self.assertRaises(...) form.  The attempt may or may not
            # raise RuntimeError, but it shouldn't raise anything other
            # than RuntimeError, and that's all we're trying to test
            # here.  The MS docs aren't clear about whether the SDK
            # PlaySound() with SND_ALIAS and SND_NODEFAULT will return
            # True or False when the alias is unknown.  On Tim's WinXP
            # box today, it returns True (no exception is raised).  What
            # we'd really like to test is that no sound is played, but
            # that requires first wiring an eardrum class into unittest
            # <wink>.
            try:
                winsound.PlaySound(
                    '!"$%&/(#+*',
                    winsound.SND_ALIAS | winsound.SND_NODEFAULT
                )
            except RuntimeError:
                pass
        else:
            self.assertRaises(           <~~~~ HERE
                RuntimeError,
                winsound.PlaySound,
                '!"$%&/(#+*', winsound.SND_ALIAS | winsound.SND_NODEFAULT
            )

So according to Lib/test/check_soundcard.vbs, the buildbot has no soundcard. Is this correct?
History
Date User Action Args
2012-08-21 11:46:56vstinnersetrecipients: + vstinner, trent
2012-08-21 11:46:55vstinnersetmessageid: <1345549616.0.0.76252811384.issue15746@psf.upfronthosting.co.za>
2012-08-21 11:46:55vstinnerlinkissue15746 messages
2012-08-21 11:46:54vstinnercreate