diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-06-26 02:42:24 (GMT) |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-06-26 02:42:24 (GMT) |
commit | b6d1cdda8e2160ac647b39776198bf48dc7e656f (patch) | |
tree | 7f3e7205c63693d9e75705af88e35fb7e9298868 /Lib/test/test_tokenize.py | |
parent | 5713b3c5bf0c27d5443e6d3a1cd2ce3495778597 (diff) | |
download | cpython-b6d1cdda8e2160ac647b39776198bf48dc7e656f.zip cpython-b6d1cdda8e2160ac647b39776198bf48dc7e656f.tar.gz cpython-b6d1cdda8e2160ac647b39776198bf48dc7e656f.tar.bz2 |
Issue #20387: Correct test to properly capture expectation.
Diffstat (limited to 'Lib/test/test_tokenize.py')
-rw-r--r-- | 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 index 00a2c2b..6506b67 100644 --- a/Lib/test/test_tokenize.py +++ b/Lib/test/test_tokenize.py @@ -1233,7 +1233,7 @@ class TestRoundtrip(TestCase): 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 @@ class TestRoundtrip(TestCase): 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]) |