File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1515
1616import unittest
1717from mbed_os_tools .test import mbed_test_api
18-
18+ from mock import patch , MagicMock
1919
2020
2121class GreenteaTestAPI (unittest .TestCase ):
@@ -589,5 +589,15 @@ def test_get_testcase_result_start_tag_missing(self):
589589 result = mbed_test_api .get_testcase_result (self .OUTPUT_STARTTAG_MISSING )
590590 self .assertEqual (result ['DNS query' ]['utest_log' ], "__testcase_start tag not found." )
591591
592+ def test_run_htrun_unicode (self ):
593+ with patch ("mbed_os_tools.test.mbed_test_api.run_command" ) as _run_command :
594+ read_line_mock = MagicMock ()
595+ read_line_mock .decode = MagicMock (return_value = u"\u036b " )
596+ p_mock = MagicMock ()
597+ p_mock .wait = MagicMock (return_value = 1337 )
598+ p_mock .stdout .readline = MagicMock (side_effect = [read_line_mock ])
599+ _run_command .return_value = p_mock
600+ returncode , htrun_output = mbed_test_api .run_htrun ("dummy" , True )
601+
592602if __name__ == '__main__' :
593603 unittest .main ()
You can’t perform that action at this time.
0 commit comments