<s> from test . test_support import TESTFN , run_unittest <EOL> import unittest <EOL> from test import audiotests <EOL> import sys <EOL> import wave <EOL> class WaveTest ( audiotests . AudioWriteTests , <EOL> audiotests . AudioTestsWithSourceFile ) : <EOL> module = wave <EOL> test_unseekable_write = None <EOL> test_unseekable_overflowed_write = None <EOL> test_unseekable_incompleted_write = None <EOL> class WavePCM8Test ( WaveTest , unittest . TestCase ) : <EOL> sndfilename = '<STR_LIT>' <EOL> sndfilenframes = <NUM_LIT> <EOL> nchannels = <NUM_LIT:2> <EOL> sampwidth = <NUM_LIT:1> <EOL> framerate = <NUM_LIT> <EOL> nframes = <NUM_LIT> <EOL> comptype = '<STR_LIT>' <EOL> compname = '<STR_LIT>' <EOL> frames = audiotests . fromhex ( """<STR_LIT>""" ) <EOL> class WavePCM16Test ( WaveTest , unittest . TestCase ) : <EOL> sndfilename = '<STR_LIT>' <EOL> sndfilenframes = <NUM_LIT> <EOL> nchannels = <NUM_LIT:2> <EOL> sampwidth = <NUM_LIT:2> <EOL> framerate = <NUM_LIT> <EOL> nframes = <NUM_LIT> <EOL> comptype = '<STR_LIT>' <EOL> compname = '<STR_LIT>' <EOL> frames = audiotests . fromhex ( """<STR_LIT>""" ) <EOL> if sys . byteorder != '<STR_LIT>' : <EOL> frames = audiotests . byteswap2 ( frames ) <EOL> if sys . byteorder == '<STR_LIT>' : <EOL> @ unittest . expectedFailure <EOL> def test_unseekable_incompleted_write ( self ) : <EOL> super ( ) . test_unseekable_incompleted_write ( ) <EOL> class WavePCM24Test ( WaveTest , unittest . TestCase ) : <EOL> sndfilename = '<STR_LIT>' <EOL> sndfilenframes = <NUM_LIT> <EOL> nchannels = <NUM_LIT:2> <EOL> sampwidth = <NUM_LIT:3> <EOL> framerate = <NUM_LIT> <EOL> nframes = <NUM_LIT> <EOL> comptype = '<STR_LIT>' <EOL> compname = '<STR_LIT>' <EOL> frames = audiotests . fromhex ( """<STR_LIT>""" ) <EOL> if sys . byteorder != '<STR_LIT>' : <EOL> frames = audiotests . byteswap3 ( frames ) <EOL> class WavePCM32Test ( WaveTest , unittest . TestCase ) : <EOL> sndfilename = '<STR_LIT>' <EOL> sndfilenframes = <NUM_LIT> <EOL> nchannels = <NUM_LIT:2> <EOL> sampwidth = <NUM_LIT:4> <EOL> framerate = <NUM_LIT> <EOL> nframes = <NUM_LIT> <EOL> comptype = '<STR_LIT>' <EOL> compname = '<STR_LIT>' <EOL> frames = audiotests . fromhex ( """<STR_LIT>""" ) <EOL> if sys . byteorder != '<STR_LIT>' : <EOL> frames = audiotests . byteswap4 ( frames ) <EOL> if sys . byteorder == '<STR_LIT>' : <EOL> @ unittest . expectedFailure <EOL> def test_unseekable_incompleted_write ( self ) : <EOL> super ( ) . test_unseekable_incompleted_write ( ) <EOL> def test_main ( ) : <EOL> run_unittest ( WavePCM8Test , WavePCM16Test , WavePCM24Test , WavePCM32Test ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> test_main ( ) </s>
