summaryrefslogtreecommitdiff
path: root/Lib/test/test_capi.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2014-11-01 15:11:05 -0700
committerSteve Dower <steve.dower@microsoft.com>2014-11-01 15:11:05 -0700
commitc317fa429bf316525fd6eeb77087f83a2cd0c648 (patch)
tree45c53bce86f4ab5648a8c4afd8951ba5c703e7ab /Lib/test/test_capi.py
parent128f8ea970372e12bad3c20f83a59e5b91ed26f8 (diff)
downloadcpython-c317fa429bf316525fd6eeb77087f83a2cd0c648.tar.gz
#22731 test_capi test fails because of mismatched newlines
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r--Lib/test/test_capi.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index a60d822bb4..de8d65a963 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",