Skip to content

Commit b6643dc

Browse files
BCSharpjaraco
authored andcommitted
bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (#13639)
* bpo-36919: make test_issue2301 implementation-independent
1 parent 95da826 commit b6643dc

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)