bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (GH-13639) (GH-15952)

* bpo-36919: make test_issue2301 implementation-independent
(cherry picked from commit b6643dcfc2)

Co-authored-by: Pavel Koneski <pavel.koneski@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-09-11 07:37:18 -07:00 committed by Jason R. Coombs
parent b18b19809d
commit 42edfcfd12
2 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class MiscSourceEncodingTest(unittest.TestCase):
try:
compile(b"# coding: cp932\nprint '\x94\x4e'", "dummy", "exec")
except SyntaxError as v:
self.assertEqual(v.text, "print '\u5e74'\n")
self.assertEqual(v.text.rstrip('\n'), "print '\u5e74'")
else:
self.fail()

View File

@ -0,0 +1,2 @@
Make ``test_source_encoding.test_issue2301`` implementation independent. The
test will work now for both CPython and IronPython.