#!/usr/bin/env python
#
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2004,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
class test_sig_source (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_hilbert (self):
- fg = self.fg
+ tb = self.tb
ntaps = 51
sampling_freq = 100
head = gr.head (gr.sizeof_float, int (ntaps + sampling_freq * 0.10))
hilb = gr.hilbert_fc (ntaps)
dst1 = gr.vector_sink_c ()
- fg.connect (src1, head)
- fg.connect (head, hilb)
- fg.connect (hilb, dst1)
- fg.run ()
+ tb.connect (src1, head)
+ tb.connect (head, hilb)
+ tb.connect (hilb, dst1)
+ tb.run ()
dst_data = dst1.data ()
self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 5)