[Python-checkins] bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (GH-13639) (GH-15952)
Jason R. Coombs
webhook-mailer at python.org
Wed Sep 11 10:37:22 EDT 2019
https://github.com/python/cpython/commit/42edfcfd129c7ac4842b9e0cd453bbe3ff006669
commit: 42edfcfd129c7ac4842b9e0cd453bbe3ff006669
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Jason R. Coombs <jaraco at jaraco.com>
date: 2019-09-11T15:37:18+01:00
summary:
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 b6643dcfc26859f935e4b3a6a2a203e8ef5320e2)
Co-authored-by: Pavel Koneski <pavel.koneski at gmail.com>
files:
A Misc/NEWS.d/next/Tests/2019-05-28-15-41-34.bpo-36919.-vGt_m.rst
M Lib/test/test_source_encoding.py
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py
index 38734009c008..a0bd741c36ac 100644
--- a/Lib/test/test_source_encoding.py
+++ b/Lib/test/test_source_encoding.py
@@ -31,7 +31,7 @@ def test_issue2301(self):
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()
diff --git a/Misc/NEWS.d/next/Tests/2019-05-28-15-41-34.bpo-36919.-vGt_m.rst b/Misc/NEWS.d/next/Tests/2019-05-28-15-41-34.bpo-36919.-vGt_m.rst
new file mode 100644
index 000000000000..9400bdda5da1
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2019-05-28-15-41-34.bpo-36919.-vGt_m.rst
@@ -0,0 +1,2 @@
+Make ``test_source_encoding.test_issue2301`` implementation independent. The
+test will work now for both CPython and IronPython.
More information about the Python-checkins
mailing list