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 15
15
16
16
import unittest
17
17
from mbed_os_tools .test import mbed_test_api
18
-
18
+ from mock import patch , MagicMock
19
19
20
20
21
21
class GreenteaTestAPI (unittest .TestCase ):
@@ -589,5 +589,15 @@ def test_get_testcase_result_start_tag_missing(self):
589
589
result = mbed_test_api .get_testcase_result (self .OUTPUT_STARTTAG_MISSING )
590
590
self .assertEqual (result ['DNS query' ]['utest_log' ], "__testcase_start tag not found." )
591
591
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
+
592
602
if __name__ == '__main__' :
593
603
unittest .main ()
You can’t perform that action at this time.
0 commit comments