Staging
v0.5.1
https://github.com/python/cpython
Revision 4cd6f2ab807e0f3a23a059a407a08c5edad6bb98 authored by Greg Ward on 14 October 2000, 03:56:42 UTC, committed by Greg Ward on 14 October 2000, 03:56:42 UTC
1 parent 0b4dafc
Raw File
Tip revision: 4cd6f2ab807e0f3a23a059a407a08c5edad6bb98 authored by Greg Ward on 14 October 2000, 03:56:42 UTC
Bastian Kleineidam: make 'check_lib()' more like AC_CHECK_LIB by adding
Tip revision: 4cd6f2a
test_sunaudiodev.py
from test_support import verbose, findfile, TestFailed
import sunaudiodev
import os

def play_sound_file(path):
    fp = open(path, 'r')
    data = fp.read()
    fp.close()
    try:
        a = sunaudiodev.open('w')
    except sunaudiodev.error, msg:
        raise TestFailed, msg
    else:
        a.write(data)
        a.close()

def test():
    play_sound_file(findfile('audiotest.au'))

test()
back to top