diff options
author | Pavel Koneski <pavel.koneski@gmail.com> | 2019-09-11 06:57:33 -0700 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2019-09-11 14:57:32 +0100 |
commit | b6643dcfc26859f935e4b3a6a2a203e8ef5320e2 (patch) | |
tree | aba93370535007439697072a362eec3dd342ca10 | |
parent | 95da826db9ed4acbc81f32296f14429c06bd2124 (diff) | |
download | cpython-git-b6643dcfc26859f935e4b3a6a2a203e8ef5320e2.tar.gz |
bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (#13639)
* bpo-36919: make test_issue2301 implementation-independent
-rw-r--r-- | Lib/test/test_source_encoding.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Tests/2019-05-28-15-41-34.bpo-36919.-vGt_m.rst | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py index 38734009c0..a0bd741c36 100644 --- a/Lib/test/test_source_encoding.py +++ b/Lib/test/test_source_encoding.py @@ -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() 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 0000000000..9400bdda5d --- /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. |