Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 951a9e3

Browse files
committed
fix to work if __doc__ is removed
1 parent 7fa8222 commit 951a9e3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_runpy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,10 @@ def test_encoding(self):
523523
with open(filename, 'w', encoding='latin1') as f:
524524
f.write("""
525525
#coding:latin1
526-
"non-ASCII: h\xe9"
526+
s = "non-ASCII: h\xe9"
527527
""")
528528
result = run_path(filename)
529-
self.assertEqual(result['__doc__'], "non-ASCII: h\xe9")
529+
self.assertEqual(result['s'], "non-ASCII: h\xe9")
530530

531531

532532
def test_main():

0 commit comments

Comments
 (0)