(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):
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):