Update of /cvsroot/pywin32/pywin32/com/win32comext/directsound/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5944/com/win32comext/directsound/test
Modified Files:
ds_test.py
Added Files:
__init__.py
Log Message:
hook the directsound tests into the main test suite
Index: ds_test.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/test/ds_test.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ds_test.py 8 Jan 2009 03:51:47 -0000 1.7
--- ds_test.py 8 Jan 2009 04:22:04 -0000 1.8
***************
*** 6,10 ****
import win32event, win32api
import os
! from pywin32_testutil import str2bytes
import win32com.directsound.directsound as ds
# next two lines are for for debugging:
--- 6,10 ----
import win32event, win32api
import os
! from pywin32_testutil import str2bytes, TestSkipped
import win32com.directsound.directsound as ds
# next two lines are for for debugging:
***************
*** 263,267 ****
def testPlay(self):
'''Mesdames et Messieurs, la cour de Devin Dazzle'''
! fname=os.path.join(os.path.dirname(__file__), "01-Intro.wav")
f = open(fname, 'rb')
hdr = f.read(WAV_HEADER_SIZE)
--- 263,282 ----
def testPlay(self):
'''Mesdames et Messieurs, la cour de Devin Dazzle'''
! # look for the test file in various places
! candidates = [
! os.path.dirname(__file__),
! os.path.dirname(sys.argv[0]),
! # relative to 'testall.py' in the win32com test suite.
! os.path.join(os.path.dirname(sys.argv[0]),
! '../../win32comext/directsound/test'),
! '.',
! ]
! for candidate in candidates:
! fname=os.path.join(candidate, "01-Intro.wav")
! if os.path.isfile(fname):
! break
! else:
! raise TestSkipped("Can't find test .wav file to play")
!
f = open(fname, 'rb')
hdr = f.read(WAV_HEADER_SIZE)
--- NEW FILE: __init__.py ---
# This is a Python package, imported by the win32com test suite.
|