[pypy-commit] pypy default: Specify the encoding, for systems where utf-8 isn't the default
rlamy
pypy.commits at gmail.com
Fri Nov 24 19:57:47 EST 2017
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch:
Changeset: r93171:9b3b4676e3b7
Date: 2017-11-25 00:55 +0000
http://bitbucket.org/pypy/pypy/changeset/9b3b4676e3b7/
Log: Specify the encoding, for systems where utf-8 isn't the default
diff --git a/extra_tests/test_textio.py b/extra_tests/test_textio.py
--- a/extra_tests/test_textio.py
+++ b/extra_tests/test_textio.py
@@ -14,7 +14,8 @@
mode=st.sampled_from(['\r', '\n', '\r\n', '']),
limit=st.integers(min_value=-1))
def test_readline(txt, mode, limit):
- textio = TextIOWrapper(BytesIO(txt.encode('utf-8')), newline=mode)
+ textio = TextIOWrapper(
+ BytesIO(txt.encode('utf-8')), encoding='utf-8', newline=mode)
lines = []
while True:
line = textio.readline(limit)
More information about the pypy-commit
mailing list