summaryrefslogtreecommitdiff
path: root/gr-blocks/python/blocks/qa_repeat.py
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2018-06-23 23:41:42 +0200
committerAndrej Rode <mail@andrejro.de>2018-06-24 00:03:35 +0200
commit167a6152bad060fc53dd29e0fa79ef83eff1be5b (patch)
treea01049672d9d7d1bf3d295ed96698a323941f8e8 /gr-blocks/python/blocks/qa_repeat.py
parent3c8e6008b092287246234001db7cf1a4038300da (diff)
parentfcd002b6ac82e1e0c1224e24506410ff0833e1aa (diff)
Merge branch 'python3_fix' into next
Manual merge conflict resolution has been applied to following conflicts: * Typos: * gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py * gr-blocks/python/blocks/qa_wavfile.py * gr-filter/examples/gr_filtdes_api.py * grc/blocks/parameter.xml * gr-uhd/python/uhd/__init__.py * ValueError -> RuntimeError: * gr-blocks/python/blocks/qa_hier_block2.py * relative Imports & other Py3k: * gr-digital/python/digital/psk_constellations.py * gr-digital/python/digital/qam_constellations.py * gr-digital/python/digital/test_soft_decisions.py * gr-digital/python/digital/gfsk.py * SequenceCompleter: * gr-utils/python/modtool/modtool_add.py * gr-utils/python/modtool/modtool_rename.py * gr-utils/python/modtool/modtool_rm.py * Updated API on next: * gr-blocks/grc/blocks_file_source.xml * gr-blocks/python/blocks/qa_file_source_sink.py * gr-qtgui/grc/qtgui_time_sink_x.xml * GRC Py3k Updates: * grc/core/Block.py * grc/core/Constants.py * grc/core/Platform.py * grc/core/utils/odict.py * grc/gui/Actions.py * grc/gui/Block.py * grc/gui/Executor.py * grc/gui/Port.py
Diffstat (limited to 'gr-blocks/python/blocks/qa_repeat.py')
-rw-r--r--[-rwxr-xr-x]gr-blocks/python/blocks/qa_repeat.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/gr-blocks/python/blocks/qa_repeat.py b/gr-blocks/python/blocks/qa_repeat.py
index eaf20d4e27..0054f8ce5e 100755..100644
--- a/gr-blocks/python/blocks/qa_repeat.py
+++ b/gr-blocks/python/blocks/qa_repeat.py
@@ -20,6 +20,7 @@
# Boston, MA 02110-1301, USA.
#
+
from gnuradio import gr, gr_unittest, blocks
class test_repeat (gr_unittest.TestCase):
@@ -31,17 +32,17 @@ class test_repeat (gr_unittest.TestCase):
self.tb = None
def test_001_float(self):
- src_data = [n*1.0 for n in range(100)];
- dst_data = []
- for n in range(100):
- dst_data += [1.0*n, 1.0*n, 1.0*n]
-
- src = blocks.vector_source_f(src_data)
- rpt = blocks.repeat(gr.sizeof_float, 3)
- dst = blocks.vector_sink_f()
- self.tb.connect(src, rpt, dst)
- self.tb.run()
- self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6)
+ src_data = [n*1.0 for n in range(100)];
+ dst_data = []
+ for n in range(100):
+ dst_data += [1.0*n, 1.0*n, 1.0*n]
+
+ src = blocks.vector_source_f(src_data)
+ rpt = blocks.repeat(gr.sizeof_float, 3)
+ dst = blocks.vector_sink_f()
+ self.tb.connect(src, rpt, dst)
+ self.tb.run()
+ self.assertFloatTuplesAlmostEqual(dst_data, dst.data(), 6)
if __name__ == '__main__':
gr_unittest.run(test_repeat, "test_repeat.xml")