diff options
author | Andrej Rode <mail@andrejro.de> | 2018-08-05 23:42:08 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-08-17 18:18:20 +0200 |
commit | f0f838e3f0484c6156bf20164af1bfa7ff150587 (patch) | |
tree | 6d42d1c55d7e5428cd143cb800f9310f73a59b9f /gr-digital/python | |
parent | 2727e413a26024b17e649bc370afc45503173af6 (diff) |
message: fix unit tests to respect mesage::to_string behaviour
Formerly to_string() returned a byte string in Python2 and a
unicode string in Python3.
To get the same behaviour for Python2 and Python3 the Unicode
String in Python3 is converted to bytes. Which is a desired behaviour
for to_string() since the carried payload of messages includes
invalid unicode characters.
Diffstat (limited to 'gr-digital/python')
-rw-r--r-- | gr-digital/python/digital/qa_framer_sink.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-digital/python/digital/qa_framer_sink.py b/gr-digital/python/digital/qa_framer_sink.py index 555bc121f8..25e2902f72 100644 --- a/gr-digital/python/digital/qa_framer_sink.py +++ b/gr-digital/python/digital/qa_framer_sink.py @@ -52,7 +52,7 @@ class test_framker_sink(gr_unittest.TestCase): header = tuple(2*[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]) # len=1 pad = (0,) * 100 src_data = code + header + (0,1,0,0,0,0,0,1) + pad - expected_data = 'A' + expected_data = b'A' rcvd_pktq = gr.msg_queue() @@ -76,7 +76,7 @@ class test_framker_sink(gr_unittest.TestCase): header = tuple(2*[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0]) # len=2 pad = (0,) * 100 src_data = code + header + (0,1,0,0,1,0,0,0) + (0,1,0,0,1,0,0,1) + pad - expected_data = 'HI' + expected_data = b'HI' rcvd_pktq = gr.msg_queue() |