X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnuradio-core%2Fsrc%2Fpython%2Fgnuradio%2Fgr%2Fqa_diff_encoder.py;h=04c0e2a4963fc59e900cdd78a37d4dd4a212f7db;hb=b44f43a12cd4b25b0fc25c47581b9440ceae4e31;hp=e09ae2c9d7177afaf4df3959a924d792d41a1e74;hpb=09a1e803a9e6587c78d20cdf16891e5295874668;p=debian%2Fgnuradio diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py b/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py index e09ae2c9..04c0e2a4 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_diff_encoder.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2006 Free Software Foundation, Inc. +# Copyright 2006,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -34,10 +34,10 @@ def make_random_int_tuple(L, min, max): class test_encoder (gr_unittest.TestCase): def setUp (self): - self.fg = gr.flow_graph () + self.tb = gr.top_block () def tearDown (self): - self.fg = None + self.tb = None def test_diff_encdec_000(self): random.seed(0) @@ -48,8 +48,8 @@ class test_encoder (gr_unittest.TestCase): enc = gr.diff_encoder_bb(modulus) dec = gr.diff_decoder_bb(modulus) dst = gr.vector_sink_b() - self.fg.connect(src, enc, dec, dst) - self.fg.run() # run the graph and wait for it to finish + self.tb.connect(src, enc, dec, dst) + self.tb.run() # run the graph and wait for it to finish actual_result = dst.data() # fetch the contents of the sink self.assertEqual(expected_result, actual_result) @@ -62,8 +62,8 @@ class test_encoder (gr_unittest.TestCase): enc = gr.diff_encoder_bb(modulus) dec = gr.diff_decoder_bb(modulus) dst = gr.vector_sink_b() - self.fg.connect(src, enc, dec, dst) - self.fg.run() # run the graph and wait for it to finish + self.tb.connect(src, enc, dec, dst) + self.tb.run() # run the graph and wait for it to finish actual_result = dst.data() # fetch the contents of the sink self.assertEqual(expected_result, actual_result) @@ -76,8 +76,8 @@ class test_encoder (gr_unittest.TestCase): enc = gr.diff_encoder_bb(modulus) dec = gr.diff_decoder_bb(modulus) dst = gr.vector_sink_b() - self.fg.connect(src, enc, dec, dst) - self.fg.run() # run the graph and wait for it to finish + self.tb.connect(src, enc, dec, dst) + self.tb.run() # run the graph and wait for it to finish actual_result = dst.data() # fetch the contents of the sink self.assertEqual(expected_result, actual_result)