[Python-checkins] cpython (3.4): Issue #20387: Correct test to properly capture expectation.

jason.coombs python-checkins at python.org
Sun Jun 28 17:17:50 CEST 2015


https://hg.python.org/cpython/rev/49323e5f6391
changeset: 96708:49323e5f6391
branch: 3.4
user: Jason R. Coombs <jaraco at jaraco.com>
date: Thu Jun 25 22:42:24 2015 -0400
summary:
 Issue #20387: Correct test to properly capture expectation.
files:
 Lib/test/test_tokenize.py | 4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py
--- a/Lib/test/test_tokenize.py
+++ b/Lib/test/test_tokenize.py
@@ -1233,7 +1233,7 @@
 def roundtrip(self, code):
 if isinstance(code, str):
 code = code.encode('utf-8')
- return untokenize(tokenize(BytesIO(code).readline))
+ return untokenize(tokenize(BytesIO(code).readline)).decode('utf-8')
 
 def test_indentation_semantics_retained(self):
 """
@@ -1241,7 +1241,7 @@
 the semantic meaning of the indentation remains consistent.
 """
 code = "if False:\n\tx=3\n\tx=3\n"
- codelines = roundtrip(code).split('\n')
+ codelines = self.roundtrip(code).split('\n')
 self.assertEqual(codelines[1], codelines[2])
 
 
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /