diff options
Diffstat (limited to 'gr-blocks/python')
-rw-r--r-- | gr-blocks/python/blocks/qa_message.py | 8 |
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) |