From 78d2ebf9a39c822d58975a994632b2a71cbf3b19 Mon Sep 17 00:00:00 2001 From: Sophist Date: Mon, 24 Mar 2014 07:42:40 +0000 Subject: [PATCH] Strip CR as well as LF to avoid errors on Windows --- test/test_bytes2human.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_bytes2human.py b/test/test_bytes2human.py index 9f8d53305..558f88664 100644 --- a/test/test_bytes2human.py +++ b/test/test_bytes2human.py @@ -49,7 +49,7 @@ class Testbytes2human(unittest.TestCase): """ Compare data generated with sample files Setting create_test_data to True will generated sample files - from code execution (developper-only, check carefully) + from code execution (developer-only, check carefully) """ filename = os.path.join('test', 'data', 'b2h_test_%s.dat' % lang) testlist = self._create_testlist() @@ -84,6 +84,6 @@ class Testbytes2human(unittest.TestCase): def _read_expected_from(self, path): with open(path, 'rb') as f: - lines = [l.rstrip("\n") for l in f.readlines()] + lines = [l.rstrip("\n").rstrip("\r") for l in f.readlines()] f.close() return lines