Skip to content

Commit

Permalink
TST: fix string decoding issue in Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jakevdp committed Sep 25, 2016
1 parent a885e91 commit 762c917
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion altair/tests/test_api.py
Expand Up @@ -72,7 +72,10 @@ def test_savechart_html():

with tempfile.NamedTemporaryFile(suffix='.html') as f:
chart.savechart(f.name)
assert f.read().strip().startswith('<!DOCTYPE html>')
content = f.read()
if hasattr(content, 'decode'):
content = content.decode('utf-8')
assert content.strip().startswith('<!DOCTYPE html>')


def test_savechart_json():
Expand Down

0 comments on commit 762c917

Please sign in to comment.