#!/usr/bin/env python
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
g_in_file = os.path.join (os.getenv ("srcdir"), "test_16bit_1chunk.wav")
-class qa_wavefile(gr_unittest.TestCase):
+class test_wavefile(gr_unittest.TestCase):
def setUp (self):
self.tb = gr.top_block ()
wf = gr.wavfile_source(g_in_file)
self.assertEqual(wf.sample_rate(), 8000)
- # disabled. Fails on PPC
- def xtest_002_checkwavcopy (self):
+ def test_002_checkwavcopy (self):
infile = g_in_file
outfile = "test_out.wav"
in_f = file(infile, 'rb')
out_f = file(outfile, 'rb')
- in_data = in_f.read(getsize(infile))
- out_data = out_f.read(getsize(outfile))
+ in_data = in_f.read()
+ out_data = out_f.read()
+ out_f.close()
os.remove(outfile)
self.assertEqual(in_data, out_data)
if __name__ == '__main__':
- gr_unittest.main ()
+ gr_unittest.run(test_wavefile, "test_wavefile.xml")