diff options
author | Barry Warsaw <barry@python.org> | 2011-10-07 19:26:54 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2011-10-07 19:26:54 (GMT) |
commit | 146177503c17c1c2b40a655a9af2b87e4746364c (patch) | |
tree | 86078f954b27b9d60be3c3b5d6a25c3ebd9b79f2 /Lib/lib2to3 | |
parent | 35d18782fbb5aacf524e2d0c253b4cc2f0e1ca93 (diff) | |
parent | de8c723ddd7306493f0322c728e8abad996fde3f (diff) | |
download | cpython-146177503c17c1c2b40a655a9af2b87e4746364c.zip cpython-146177503c17c1c2b40a655a9af2b87e4746364c.tar.gz cpython-146177503c17c1c2b40a655a9af2b87e4746364c.tar.bz2 |
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
(see issue 13125).
Diffstat (limited to 'Lib/lib2to3')
-rw-r--r-- | Lib/lib2to3/tests/test_parser.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index 60e5d63..f32404c 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -166,7 +166,7 @@ class TestParserIdempotency(support.TestCase): encoding = tokenize.detect_encoding(fp.readline)[0] self.assertTrue(encoding is not None, "can't detect encoding for %s" % filepath) - with open(filepath, "r") as fp: + with open(filepath, "r", encoding=encoding) as fp: source = fp.read() try: tree = driver.parse_string(source) @@ -174,8 +174,6 @@ class TestParserIdempotency(support.TestCase): print('ParseError on file', filepath, err) continue new = str(tree) - if encoding: - new = new.encode(encoding) if diff(filepath, new): self.fail("Idempotency failed: %s" % filepath) |