Updating all python QA programs in gnuradio-core to output XML files.
[debian/gnuradio] / gnuradio-core / src / python / gnuradio / gr / qa_wavefile.py
index c6d376a8181aee6cddd72f6faef7f0fec1a1432f..d9f38e3f1e885b019ece52e3d1cd3ee4d2a847d4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2010 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -27,7 +27,7 @@ from os.path import getsize
 
 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 ()
@@ -57,12 +57,13 @@ class qa_wavefile(gr_unittest.TestCase):
        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")