From: Ezio Melotti Date: Thu, 29 Nov 2012 03:08:54 +0000 (+0200) Subject: #16549: fix test failures on Windows. X-Git-Tag: v2.7.4rc1~341 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43acbf1fd67f144ca050195411e773eea16b8de1;p=thirdparty%2FPython%2Fcpython.git #16549: fix test failures on Windows. --- diff --git a/Lib/json/tests/test_tool.py b/Lib/json/tests/test_tool.py index b5d4fca4fa3c..27dfb84fdbdb 100644 --- a/Lib/json/tests/test_tool.py +++ b/Lib/json/tests/test_tool.py @@ -42,7 +42,7 @@ class TestTool(unittest.TestCase): (sys.executable, '-m', 'json.tool'), stdin=subprocess.PIPE, stdout=subprocess.PIPE) out, err = proc.communicate(self.data.encode()) - self.assertEqual(out, self.expect.encode()) + self.assertEqual(out.splitlines(), self.expect.encode().splitlines()) self.assertEqual(err, None) def _create_infile(self): @@ -55,7 +55,7 @@ class TestTool(unittest.TestCase): def test_infile_stdout(self): infile = self._create_infile() rc, out, err = assert_python_ok('-m', 'json.tool', infile) - self.assertEqual(out, self.expect.encode()) + self.assertEqual(out.splitlines(), self.expect.encode().splitlines()) self.assertEqual(err, b'') def test_infile_outfile(self):