Fixed a few python2 tests.

This commit is contained in:
Michael Lazar
2016-07-26 01:15:18 -07:00
parent 5a5d9ac56d
commit 620434eed0
3 changed files with 8 additions and 5 deletions

View File

@@ -154,7 +154,7 @@ def test_terminal_clean_unescape_html(terminal, use_ascii):
terminal.config['ascii'] = use_ascii
text = terminal.clean('<')
assert isinstance(text, six.binary_type)
assert text.decode('ascii' if ascii else 'utf-8') == '<'
assert text.decode('ascii' if use_ascii else 'utf-8') == '<'
@pytest.mark.parametrize('use_ascii', [True, False])