From 3d573d8736eb1bd7df39af7333dadc71da698d45 Mon Sep 17 00:00:00 2001 From: "George Y. Kussumoto" Date: Tue, 9 Oct 2018 23:32:46 -0300 Subject: [PATCH] Fix xargs.partion: win32 test --- tests/xargs_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/xargs_test.py b/tests/xargs_test.py index de16a012..65336c58 100644 --- a/tests/xargs_test.py +++ b/tests/xargs_test.py @@ -55,7 +55,8 @@ def test_partition_limits(): def test_partition_limit_win32(sys_win32_mock): cmd = ('ninechars',) - varargs = ('😑' * 10,) + # counted as half because of utf-16 encode + varargs = ('😑' * 5,) with mock.patch('pre_commit.xargs.sys', sys_win32_mock): ret = xargs.partition(cmd, varargs, _max_length=20)