Fix path truncation test: really use bytes

Test is to use bytes but because of __future__.unicode_literals it used
unicode.
This commit is contained in:
Bruno Cauet 2015-02-12 11:56:54 +01:00
parent 54abd1a510
commit e1e46df1b3

View file

@ -1007,8 +1007,8 @@ class PathStringTest(_common.TestCase):
class PathTruncationTest(_common.TestCase):
def test_truncate_bytestring(self):
with _common.platform_posix():
p = util.truncate_path('abcde/fgh', 4)
self.assertEqual(p, 'abcd/fgh')
p = util.truncate_path(b'abcde/fgh', 4)
self.assertEqual(p, b'abcd/fgh')
def test_truncate_unicode(self):
with _common.platform_posix():