diff options
author | jcorgan | 2007-10-22 19:00:37 +0000 |
---|---|---|
committer | jcorgan | 2007-10-22 19:00:37 +0000 |
commit | e7e760bad5ad27ee6e8ba2d218a25330675f03f9 (patch) | |
tree | a7cd67cc0838745579ec52c86a55870fd88e66a9 /gr-howto-write-a-block/src/python/qa_howto.py | |
parent | a688351b4f53b8dbf7412788be04e5eeffa11346 (diff) | |
download | gnuradio-e7e760bad5ad27ee6e8ba2d218a25330675f03f9.tar.gz gnuradio-e7e760bad5ad27ee6e8ba2d218a25330675f03f9.tar.bz2 gnuradio-e7e760bad5ad27ee6e8ba2d218a25330675f03f9.zip |
Update howto QA code to use new topblock code.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6674 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-howto-write-a-block/src/python/qa_howto.py')
-rwxr-xr-x | gr-howto-write-a-block/src/python/qa_howto.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gr-howto-write-a-block/src/python/qa_howto.py b/gr-howto-write-a-block/src/python/qa_howto.py index d664cd02c..0abe0e244 100755 --- a/gr-howto-write-a-block/src/python/qa_howto.py +++ b/gr-howto-write-a-block/src/python/qa_howto.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2004 Free Software Foundation, Inc. +# Copyright 2004,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -26,10 +26,10 @@ import howto class qa_howto (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_001_square_ff (self): src_data = (-3, 4, -5.5, 2, 3) @@ -37,9 +37,9 @@ class qa_howto (gr_unittest.TestCase): src = gr.vector_source_f (src_data) sqr = howto.square_ff () dst = gr.vector_sink_f () - self.fg.connect (src, sqr) - self.fg.connect (sqr, dst) - self.fg.run () + self.tb.connect (src, sqr) + self.tb.connect (sqr, dst) + self.tb.run () result_data = dst.data () self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6) @@ -49,9 +49,9 @@ class qa_howto (gr_unittest.TestCase): src = gr.vector_source_f (src_data) sqr = howto.square2_ff () dst = gr.vector_sink_f () - self.fg.connect (src, sqr) - self.fg.connect (sqr, dst) - self.fg.run () + self.tb.connect (src, sqr) + self.tb.connect (sqr, dst) + self.tb.run () result_data = dst.data () self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6) |