diff options
author | Paul Wicks <pwicks86@gmail.com> | 2018-05-30 17:00:35 -0700 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-07-15 15:59:57 +0200 |
commit | efdc8e84ca893d2314758d5b9eeef7cedb1c8c83 (patch) | |
tree | e3a9cce99631aecb6040cbc95220e872e159b2ae /gr-blocks/python | |
parent | 5c63d71d44f299cda7ca5f8a3617a1d5b67c7544 (diff) |
Update test to include a tag that should be skipped due to being in the skipped portion of samples
Diffstat (limited to 'gr-blocks/python')
-rwxr-xr-x | gr-blocks/python/blocks/qa_skiphead.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gr-blocks/python/blocks/qa_skiphead.py b/gr-blocks/python/blocks/qa_skiphead.py index 098e7b1e94..16a4ba13b4 100755 --- a/gr-blocks/python/blocks/qa_skiphead.py +++ b/gr-blocks/python/blocks/qa_skiphead.py @@ -114,7 +114,8 @@ class test_skiphead(gr_unittest.TestCase): skip_cnt = 25 expected_result = tuple(self.src_data[skip_cnt:]) - src_tags = tuple([make_tag('foo', 'bar', 50, 'src')]) + src_tags = tuple([make_tag('foo', 'bar', 1, 'src'), + make_tag('baz', 'qux', 50, 'src')]) src1 = blocks.vector_source_i(self.src_data, tags=src_tags) op = blocks.skiphead(gr.sizeof_int, skip_cnt) dst1 = blocks.vector_sink_i() @@ -123,6 +124,11 @@ class test_skiphead(gr_unittest.TestCase): dst_data = dst1.data() self.assertEqual(expected_result, dst_data) self.assertEqual(dst1.tags()[0].offset, 25, "Tag offset is incorrect") + self.assertEqual(len(dst1.tags()), 1, "Wrong number of tags received") + self.assertEqual(pmt.to_python( + dst1.tags()[0].key), "baz", "Tag key is incorrect") + self.assertEqual(pmt.to_python( + dst1.tags()[0].value), "qux", "Tag value is incorrect") if __name__ == '__main__': gr_unittest.run(test_skiphead, "test_skiphead.xml") |