Skip to content

Commit 42edfcf

Browse files
miss-islingtonBCSharp
authored andcommitted
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 b6643dc) Co-authored-by: Pavel Koneski <pavel.koneski@gmail.com>
1 parent b18b198 commit 42edfcf

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

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)