Skip to content

Commit

Permalink
jupyter#751 fixed python2 kernel output parsing for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Mitusinski committed Mar 22, 2018
1 parent a301aa4 commit a7d8cc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nbconvert/preprocessors/tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def normalize_output(output):
['model_id'] = '<MODEL_ID>'
for key, value in output.get('data', {}).items():
if isinstance(value, string_types):
if sys.version_info.major == 2:
value = value.replace('u\'', '\'')
output['data'][key] = _normalize_base64(value)
if 'traceback' in output:
tb = [
Expand Down

0 comments on commit a7d8cc3

Please sign in to comment.