diff options
author | Steve Dower <steve.dower@microsoft.com> | 2014-11-01 22:11:05 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2014-11-01 22:11:05 (GMT) |
commit | 86e9deb5aabd581316b7da556f506b07be982526 (patch) | |
tree | 5fc4bafaec82f6c16306a747b7ae0688e012e9a3 /Lib/test/test_capi.py | |
parent | 1be0c618827c14dd3f813f38fb3c788e140e9b72 (diff) | |
download | cpython-86e9deb5aabd581316b7da556f506b07be982526.zip cpython-86e9deb5aabd581316b7da556f506b07be982526.tar.gz cpython-86e9deb5aabd581316b7da556f506b07be982526.tar.bz2 |
#22731 test_capi test fails because of mismatched newlines
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r-- | Lib/test/test_capi.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index a60d822..de8d65a 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -304,12 +304,13 @@ class EmbeddingTests(unittest.TestCase): cmd.extend(args) p = subprocess.Popen(cmd, stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + stderr=subprocess.PIPE, + universal_newlines=True) (out, err) = p.communicate() self.assertEqual(p.returncode, 0, "bad returncode %d, stderr is %r" % (p.returncode, err)) - return out.decode("latin1"), err.decode("latin1") + return out, err def test_subinterps(self): # This is just a "don't crash" test @@ -339,7 +340,7 @@ class EmbeddingTests(unittest.TestCase): expected_errors = sys.__stdout__.errors expected_stdin_encoding = sys.__stdin__.encoding expected_pipe_encoding = self._get_default_pipe_encoding() - expected_output = os.linesep.join([ + expected_output = '\n'.join([ "--- Use defaults ---", "Expected encoding: default", "Expected errors: default", |