Show More
@@ -2078,7 +2078,7 b' class InteractiveShell(SingletonConfigurable):' | |||||
2078 | try: |
|
2078 | try: | |
2079 | print(val) |
|
2079 | print(val) | |
2080 | except UnicodeEncodeError: |
|
2080 | except UnicodeEncodeError: | |
2081 |
print(val.encode( |
|
2081 | print(val.encode("utf-8", "backslashreplace").decode()) | |
2082 |
|
2082 | |||
2083 | def showsyntaxerror(self, filename=None, running_compiled_code=False): |
|
2083 | def showsyntaxerror(self, filename=None, running_compiled_code=False): | |
2084 | """Display the syntax error that just occurred. |
|
2084 | """Display the syntax error that just occurred. |
@@ -452,6 +452,7 b' class InteractiveShellTestCase(unittest.TestCase):' | |||||
452 | @mock.patch("builtins.print") |
|
452 | @mock.patch("builtins.print") | |
453 | def test_showtraceback_with_surrogates(self, mocked_print): |
|
453 | def test_showtraceback_with_surrogates(self, mocked_print): | |
454 | values = [] |
|
454 | values = [] | |
|
455 | ||||
455 | def mock_print_func(value, sep=" ", end="\n", file=sys.stdout, flush=False): |
|
456 | def mock_print_func(value, sep=" ", end="\n", file=sys.stdout, flush=False): | |
456 | values.append(value) |
|
457 | values.append(value) | |
457 | if value == chr(0xD8FF): |
|
458 | if value == chr(0xD8FF): |
General Comments 0
You need to be logged in to leave comments.
Login now