mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (#13639)
* bpo-36919: make test_issue2301 implementation-independent
This commit is contained in:
parent
95da826db9
commit
b6643dcfc2
2 changed files with 3 additions and 1 deletions
|
@ -31,7 +31,7 @@ class MiscSourceEncodingTest(unittest.TestCase):
|
||||||
try:
|
try:
|
||||||
compile(b"# coding: cp932\nprint '\x94\x4e'", "dummy", "exec")
|
compile(b"# coding: cp932\nprint '\x94\x4e'", "dummy", "exec")
|
||||||
except SyntaxError as v:
|
except SyntaxError as v:
|
||||||
self.assertEqual(v.text, "print '\u5e74'\n")
|
self.assertEqual(v.text.rstrip('\n'), "print '\u5e74'")
|
||||||
else:
|
else:
|
||||||
self.fail()
|
self.fail()
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Make ``test_source_encoding.test_issue2301`` implementation independent. The
|
||||||
|
test will work now for both CPython and IronPython.
|
Loading…
Add table
Add a link
Reference in a new issue