[Python-Dev] 2.1c1: 2nd test_asynchat fails on Solaris 8
Fred L. Drake, Jr.
fdrake@acm.org
Fri, 13 Apr 2001 21:49:51 -0400 (EDT)
--k6y/EtxsEc
Content-Type: text/plain; charset=us-ascii
Content-Description: message body and .signature
Content-Transfer-Encoding: 7bit
Guido van Rossum writes:
> Compiling on a server doesn't mean you'll run on a server only. But
> the test should mark itself as "skipped" when /dev/audio doesn't
> exist. I don't know how easy that is.
Mark,
Please try the following patch to Lib/test/test_sunaudiodev.py and
let us know how that works for you.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Digital Creations
--k6y/EtxsEc
Content-Type: text/plain
Content-Description: test_sunaudiodev.py patch
Content-Disposition: inline;
filename="patch"
Content-Transfer-Encoding: 7bit
Index: test_sunaudiodev.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sunaudiodev.py,v
retrieving revision 1.9
diff -c -r1.9 test_sunaudiodev.py
*** test_sunaudiodev.py 2001/01/17 21:51:36 1.9
--- test_sunaudiodev.py 2001/04/14 01:47:49
***************
*** 1,6 ****
! from test_support import verbose, findfile, TestFailed
import sunaudiodev
import os
def play_sound_file(path):
fp = open(path, 'r')
--- 1,14 ----
! from test_support import verbose, findfile, TestFailed, TestSkipped
import sunaudiodev
import os
+
+ try:
+ audiodev = os.environ["AUDIODEV"]
+ except KeyError:
+ audiodev = "/dev/audio"
+
+ if not os.path.exists(audiodev):
+ raise TestSkipped("no audio device dound!")
def play_sound_file(path):
fp = open(path, 'r')
--k6y/EtxsEc--