diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py index 6e9c4fc23e4..96d2bebbc44 100644 --- a/Lib/test/test_runpy.py +++ b/Lib/test/test_runpy.py @@ -523,10 +523,10 @@ def test_encoding(self): with open(filename, 'w', encoding='latin1') as f: f.write(""" #coding:latin1 -"non-ASCII: h\xe9" +s = "non-ASCII: h\xe9" """) result = run_path(filename) - self.assertEqual(result['__doc__'], "non-ASCII: h\xe9") + self.assertEqual(result['s'], "non-ASCII: h\xe9") def test_main():