Skip to content

Commit c211939

Browse files
miss-islingtonBCSharp
authored andcommitted
bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (GH-13639) (GH-15953)
* bpo-36919: make test_issue2301 implementation-independent (cherry picked from commit b6643dc) Co-authored-by: Pavel Koneski <pavel.koneski@gmail.com>
1 parent 4c2fa5c commit c211939

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/test/test_source_encoding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_issue2301(self):
3131
try:
3232
compile(b"# coding: cp932\nprint '\x94\x4e'", "dummy", "exec")
3333
except SyntaxError as v:
34-
self.assertEqual(v.text, "print '\u5e74'\n")
34+
self.assertEqual(v.text.rstrip('\n'), "print '\u5e74'")
3535
else:
3636
self.fail()
3737

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Make ``test_source_encoding.test_issue2301`` implementation independent. The
2+
test will work now for both CPython and IronPython.

0 commit comments

Comments
 (0)