summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2018-08-11 17:41:30 +0200
committerMarcus Müller <marcus@hostalia.de>2018-08-17 18:18:20 +0200
commit02f12f3e48ba294e176dd1ef86c2ff8c79618007 (patch)
tree77f3359ebeeae1298c7b4af705cc6e8b3174a04a
parentf0f838e3f0484c6156bf20164af1bfa7ff150587 (diff)
message: add unicode characters to message test
-rw-r--r--gr-blocks/python/blocks/qa_message.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gr-blocks/python/blocks/qa_message.py b/gr-blocks/python/blocks/qa_message.py
index 1a3d250ab3..6a50f53b2a 100644
--- a/gr-blocks/python/blocks/qa_message.py
+++ b/gr-blocks/python/blocks/qa_message.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+# -*- coding: utf-8 -*-
#
# Copyright 2004,2010,2013,2016 Free Software Foundation, Inc.
#
@@ -20,12 +21,14 @@
# Boston, MA 02110-1301, USA.
#
+from __future__ import unicode_literals
import time
from gnuradio import gr, gr_unittest, blocks
import pmt
+
def all_counts():
return (gr.block_ncurrently_allocated(),
gr.block_detail_ncurrently_allocated(),
@@ -62,6 +65,11 @@ class test_message(gr_unittest.TestCase):
msg = gr.message_from_string(s.decode('utf8'))
self.assertEquals(s, msg.to_string())
+ def test_102_unicodechars(self):
+ s = "(╯°□°)╯︵ ┻━┻"
+ msg = gr.message_from_string(s)
+ self.assertEquals(s.encode('utf8'), msg.to_string())
+
def test_200(self):
self.leak_check(self.body_200)