diff options
author | mormj <mormjb@gmail.com> | 2020-10-30 10:59:50 -0400 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-10-30 17:52:53 +0100 |
commit | 7a0948ba85758fba1cc3858ef99bfa600dcc7416 (patch) | |
tree | 610d7f9d773a193562def6df2d4b50f1bb3b3f86 /gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py | |
parent | 12192ee7d58de95ddca35a3e93bfc172bdb5c820 (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 'gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py')
-rw-r--r-- | gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py b/gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py index 938897ccb5..98344b5175 100644 --- a/gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py +++ b/gr-fec/python/fec/qa_fecapi_cc_buffer_overflow.py @@ -15,21 +15,24 @@ from gnuradio import blocks, analog # This test tries to checks for the kind of buffer overflows in the # FECAPI convolutional decoder that were fixed in #2965 + class test_fecapi_cc_buffer_overflow(gr_unittest.TestCase): def run_with_frame_len(self, frame_len): self.tb = gr.top_block() noise = analog.noise_source_f(analog.GR_GAUSSIAN, 1, 0) head = blocks.head(gr.sizeof_float, self.n_frames * frame_len) - tag = blocks.stream_to_tagged_stream(gr.sizeof_float, 1, frame_len, "packet_len") + tag = blocks.stream_to_tagged_stream( + gr.sizeof_float, 1, frame_len, "packet_len") stream2pdu = blocks.tagged_stream_to_pdu(blocks.float_t, 'packet_len') - - viterbi = fec.cc_decoder.make(frame_len//2, 7, 2, [79,-109], 0, -1, fec.CC_TERMINATED, False) + + viterbi = fec.cc_decoder.make( + frame_len // 2, 7, 2, [79, -109], 0, -1, fec.CC_TERMINATED, False) cc_decoder = fec.async_decoder(viterbi, False, False, frame_len) - + self.tb.connect(noise, head, tag, stream2pdu) self.tb.msg_connect((stream2pdu, 'pdus'), (cc_decoder, 'in')) - + self.tb.run() # the test is considered successful if it hasn't segfaulted or aborted @@ -39,8 +42,9 @@ class test_fecapi_cc_buffer_overflow(gr_unittest.TestCase): self.n_frames = 10 for frame_len in range(1000, 2000): - with self.subTest(frame_length = frame_len): + with self.subTest(frame_length=frame_len): self.run_with_frame_len(frame_len) - + + if __name__ == '__main__': gr_unittest.run(test_fecapi_cc_buffer_overflow) |