From: Simon Glass Date: Tue, 14 May 2019 21:53:53 +0000 (-0600) Subject: patman: Adjust functional tests for Python 3 X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=e6dca5e8f8d4160a6efed05f5275426e2d274542;p=u-boot.git patman: Adjust functional tests for Python 3 Change the code so that it works on both Python 2 and Python 3. This works by using unicode instead of latin1 for the test input, and ensuring that the output is converted to a string rather than a unicode object on Python 2. Signed-off-by: Simon Glass --- diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index f7d5ad68f6..50a2741439 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -129,10 +129,10 @@ class TestFunctional(unittest.TestCase): """ process_tags = True ignore_bad_tags = True - stefan = u'Stefan Brüns ' + stefan = b'Stefan Br\xc3\xbcns '.decode('utf-8') rick = 'Richard III ' - mel = u'Lord Mëlchett ' - ed = u'Lond Edmund Blackaddër '.decode('utf-8') + ed = b'Lond Edmund Blackadd\xc3\xabr