From fa5f75a7ceac6c40b72484b73dfa2e7434a2c1a8 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 12 Oct 2012 11:44:10 -0400 Subject: [PATCH] fix to work if __doc__ is removed --- Lib/test/test_runpy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py index 8b443f6b85..fefefc4285 100644 --- a/Lib/test/test_runpy.py +++ b/Lib/test/test_runpy.py @@ -565,10 +565,10 @@ class RunPathTestCase(unittest.TestCase, CodeExecutionMixin): 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(): -- 2.50.1