Fix UnicodeEncodeError when string comparison with unicode has failed.
This commit is contained in:
@@ -816,3 +816,12 @@ def test_assert_indirect_tuple_no_warning(testdir):
|
||||
result = testdir.runpytest('-rw')
|
||||
output = '\n'.join(result.stdout.lines)
|
||||
assert 'WR1' not in output
|
||||
|
||||
def test_assert_with_unicode(monkeypatch, testdir):
|
||||
testdir.makepyfile(u"""
|
||||
# -*- coding: utf-8 -*-
|
||||
def test_unicode():
|
||||
assert u'유니코드' == u'Unicode'
|
||||
""")
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines(['*AssertionError*'])
|
||||
|
||||
Reference in New Issue
Block a user