Skip to content

Commit 7469433

Browse files
committed
Fix the bytes_to_native_str test on Py3
1 parent 6611ec6 commit 7469433

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

future/tests/test_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,10 @@ def test_bytes_to_native_str(self):
181181
"""
182182
b = bytes(b'abc')
183183
s = bytes_to_native_str(b)
184-
self.assertEqual(b, s)
184+
if PY2:
185+
self.assertEqual(s, b)
186+
else:
187+
self.assertEqual(s, 'abc')
185188
self.assertTrue(isinstance(s, native_str))
186189
self.assertEqual(type(s), native_str)
187190

0 commit comments

Comments
 (0)