diff options
author | Josh Morman <mormjb@gmail.com> | 2020-04-23 08:05:31 -0400 |
---|---|---|
committer | Josh Morman <mormjb@gmail.com> | 2020-06-04 10:05:47 -0400 |
commit | 8714e249cdfeb1da4405c35ecc8ab718e4e7dcc6 (patch) | |
tree | ba54f56c0f9951855ddade5f426ad34c9efb0ce0 /gr-blocks/python/blocks/qa_block_gateway.py | |
parent | 2aaa3593989a709911a83aa4890a8f6a22c484f3 (diff) |
blocks: add pybind11 bindings
Diffstat (limited to 'gr-blocks/python/blocks/qa_block_gateway.py')
-rw-r--r-- | gr-blocks/python/blocks/qa_block_gateway.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gr-blocks/python/blocks/qa_block_gateway.py b/gr-blocks/python/blocks/qa_block_gateway.py index efae5410b3..b257e7ddd8 100644 --- a/gr-blocks/python/blocks/qa_block_gateway.py +++ b/gr-blocks/python/blocks/qa_block_gateway.py @@ -204,12 +204,13 @@ class test_block_gateway(gr_unittest.TestCase): src0 = blocks.vector_source_f([1, 3, 5, 7, 9], False) src1 = blocks.vector_source_f([0, 2, 4, 6, 8], False) adder = add_2_f32_1_f32() + adder.name() sink = blocks.vector_sink_f() tb.connect((src0, 0), (adder, 0)) tb.connect((src1, 0), (adder, 1)) tb.connect(adder, sink) tb.run() - self.assertEqual(sink.data(), (1, 5, 9, 13, 17)) + self.assertEqual(sink.data(), [1, 5, 9, 13, 17]) def test_add_fc32(self): tb = gr.top_block() @@ -221,7 +222,7 @@ class test_block_gateway(gr_unittest.TestCase): tb.connect((src1, 0), (adder, 1)) tb.connect(adder, sink) tb.run() - self.assertEqual(sink.data(), (1, 5j, 9, 13j, 17)) + self.assertEqual(sink.data(), [1, 5j, 9, 13j, 17]) def test_convolve(self): tb = gr.top_block() @@ -230,7 +231,7 @@ class test_block_gateway(gr_unittest.TestCase): sink = blocks.vector_sink_f() tb.connect(src, cv, sink) tb.run() - self.assertEqual(sink.data(), (1, 2, 3, 4, 5, 6, 7, 8)) + self.assertEqual(sink.data(), [1, 2, 3, 4, 5, 6, 7, 8]) def test_decim2x(self): tb = gr.top_block() @@ -239,7 +240,7 @@ class test_block_gateway(gr_unittest.TestCase): sink = blocks.vector_sink_f() tb.connect(src, d2x, sink) tb.run() - self.assertEqual(sink.data(), (1, 3, 5, 7)) + self.assertEqual(sink.data(), [1, 3, 5, 7]) def test_interp2x(self): tb = gr.top_block() @@ -248,7 +249,7 @@ class test_block_gateway(gr_unittest.TestCase): sink = blocks.vector_sink_f() tb.connect(src, i2x, sink) tb.run() - self.assertEqual(sink.data(), (1, 1, 3, 3, 5, 5, 7, 7, 9, 9)) + self.assertEqual(sink.data(), [1, 1, 3, 3, 5, 5, 7, 7, 9, 9]) def test_tags(self): src = tag_source() @@ -276,7 +277,7 @@ class test_block_gateway(gr_unittest.TestCase): sink = blocks.vector_sink_f() tb.connect(src, convert, v2s, sink) tb.run() - self.assertEqual(sink.data(), (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) + self.assertEqual(sink.data(), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) def test_non_sync_block(self): tb = gr.top_block () |