Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix test_json failure in Python 3 (#1024)
Browse files Browse the repository at this point in the history
Make sure we open a NamedTemporaryFile in a way that allows writing
strings (not just bytes). In Python 3, string literals are unicode.
  • Loading branch information
znation authored Aug 22, 2018
1 parent 0dc560b commit 7dfe7a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unity/python/turicreate/test/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def test_malformed_json(self):
}
]
"""
with tempfile.NamedTemporaryFile() as f:
with tempfile.NamedTemporaryFile('w') as f:
f.write(out)
f.flush()

Expand Down

0 comments on commit 7dfe7a8

Please sign in to comment.