summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py
diff options
context:
space:
mode:
authormormj <mormjb@gmail.com>2020-10-30 10:59:50 -0400
committerMarcus Müller <marcus@hostalia.de>2020-10-30 17:52:53 +0100
commit7a0948ba85758fba1cc3858ef99bfa600dcc7416 (patch)
tree610d7f9d773a193562def6df2d4b50f1bb3b3f86 /gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py
parent12192ee7d58de95ddca35a3e93bfc172bdb5c820 (diff)
qa: run autopep8 formatting on qa python files
find ./ -iname qa*.py | xargs autopep8 --in-place -a -a mostly formats whitespace and gets rid of trailing semicolons
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py')
-rw-r--r--gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py48
1 files changed, 30 insertions, 18 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py b/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py
index a5895e8db0..3e42c79b7d 100644
--- a/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py
+++ b/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py
@@ -15,27 +15,27 @@ import pmt
class test_hblk(gr.hier_block2):
- def __init__(self, io_sig=1*[gr.sizeof_gr_complex], ndebug=2):
+ def __init__(self, io_sig=1 * [gr.sizeof_gr_complex], ndebug=2):
# parent constructor
- gr.hier_block2.__init__(self,
- "test_hblk",
- gr.io_signature(len(io_sig), len(io_sig), io_sig[0]),
- gr.io_signature(0,0,0))
+ gr.hier_block2.__init__(
+ self, "test_hblk", gr.io_signature(
+ len(io_sig), len(io_sig), io_sig[0]), gr.io_signature(
+ 0, 0, 0))
- self.message_port_register_hier_in("msg_in");
+ self.message_port_register_hier_in("msg_in")
# Internal Stream Blocks
self.vsnk = blocks.vector_sink_c()
# Internal Msg Blocks
- self.blks = [];
+ self.blks = []
for i in range(0, ndebug):
- self.blks.append( blocks.message_debug() )
+ self.blks.append(blocks.message_debug())
# Set up internal connections
- self.connect( self, self.vsnk )
+ self.connect(self, self.vsnk)
for blk in self.blks:
- self.msg_connect( self, "msg_in", blk, "print" )
+ self.msg_connect(self, "msg_in", blk, "print")
class test_hier_block2(gr_unittest.TestCase):
@@ -103,30 +103,42 @@ class test_hier_block2(gr_unittest.TestCase):
self.multi(self.Block(), 5)
def test_010(self):
- s, h, k = analog.sig_source_c(44100, analog.GR_COS_WAVE, 440, 1.0, 0.0), blocks.head(gr.sizeof_gr_complex, 1000), test_hblk([gr.sizeof_gr_complex], 0)
+ s, h, k = analog.sig_source_c(44100, analog.GR_COS_WAVE, 440, 1.0, 0.0), blocks.head(
+ gr.sizeof_gr_complex, 1000), test_hblk([gr.sizeof_gr_complex], 0)
tb = gr.top_block()
- tb.connect(s,h,k)
+ tb.connect(s, h, k)
tb.run()
def test_011(self):
- s, st, h, k = analog.sig_source_c(44100, analog.GR_COS_WAVE, 440, 1.0, 0.0), blocks.message_strobe(pmt.PMT_NIL, 100), blocks.head(gr.sizeof_gr_complex, 1000), test_hblk([gr.sizeof_gr_complex], 1)
+ s, st, h, k = analog.sig_source_c(
+ 44100, analog.GR_COS_WAVE, 440, 1.0, 0.0), blocks.message_strobe(
+ pmt.PMT_NIL, 100), blocks.head(
+ gr.sizeof_gr_complex, 1000), test_hblk(
+ [
+ gr.sizeof_gr_complex], 1)
tb = gr.top_block()
- tb.connect(s,h,k)
- tb.msg_connect(st,"strobe",k,"msg_in")
+ tb.connect(s, h, k)
+ tb.msg_connect(st, "strobe", k, "msg_in")
tb.start()
time.sleep(1)
tb.stop()
tb.wait()
def test_012(self):
- s, st, h, k = analog.sig_source_c(44100, analog.GR_COS_WAVE, 440, 1.0, 0.0), blocks.message_strobe(pmt.PMT_NIL, 100), blocks.head(gr.sizeof_gr_complex, 1000), test_hblk([gr.sizeof_gr_complex], 16)
+ s, st, h, k = analog.sig_source_c(
+ 44100, analog.GR_COS_WAVE, 440, 1.0, 0.0), blocks.message_strobe(
+ pmt.PMT_NIL, 100), blocks.head(
+ gr.sizeof_gr_complex, 1000), test_hblk(
+ [
+ gr.sizeof_gr_complex], 16)
tb = gr.top_block()
- tb.connect(s,h,k)
- tb.msg_connect(st,"strobe",k,"msg_in")
+ tb.connect(s, h, k)
+ tb.msg_connect(st, "strobe", k, "msg_in")
tb.start()
time.sleep(1)
tb.stop()
tb.wait()
+
if __name__ == '__main__':
gr_unittest.run(test_hier_block2)