From 0b3af2dadd93bfa8cb21bd9ee14ca08481948e8c Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Tue, 16 Jul 2019 10:34:55 +0200 Subject: [PATCH] tests: handle unicode output in test bypassing main() --- tests/oleobj/test_basic.py | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/tests/oleobj/test_basic.py b/tests/oleobj/test_basic.py index 8ad0ef5..f2c2a8f 100644 --- a/tests/oleobj/test_basic.py +++ b/tests/oleobj/test_basic.py @@ -10,6 +10,7 @@ from glob import glob # Directory with test data, independent of current working directory from tests.test_utils import DATA_BASE_DIR, call_and_capture from oletools import oleobj +from oletools.common.io_encoding import ensure_stdout_handles_unicode #: provide some more info to find errors @@ -61,6 +62,7 @@ def calc_md5(filename): def preread_file(args): """helper for TestOleObj.test_non_streamed: preread + call process_file""" + ensure_stdout_handles_unicode() # usually, main() call this ignore_arg, output_dir, filename = args if ignore_arg != '-d': raise ValueError('ignore_arg not as expected!') -- libgit2 0.21.4