From: Terry Jan Reedy Date: Tue, 21 Jan 2014 08:07:43 +0000 (-0500) Subject: Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins. X-Git-Tag: v2.7.8~104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e2793c413d94cc9ea5ad71804817c241719bf82;p=python Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins. I do not expect a problem in 2.7, but backported this anyway, 'in case'. --- diff --git a/Lib/idlelib/idle_test/test_calltips.py b/Lib/idlelib/idle_test/test_calltips.py index 4fbb565eb0..0560a51223 100644 --- a/Lib/idlelib/idle_test/test_calltips.py +++ b/Lib/idlelib/idle_test/test_calltips.py @@ -34,6 +34,13 @@ tc = TC() signature = ct.get_arg_text # 2.7 and 3.x use different functions class Get_signatureTest(unittest.TestCase): + # The signature function must return a string, even if blank. + # Test a variety of objects to be sure that none cause it to raise + # (quite aside from getting as correct an answer as possible). + # The tests of builtins may break if the docstrings change, + # but a red buildbot is better than a user crash (as has happened). + # For a simple mismatch, change the expected output to the actual. + def test_builtins(self): # 2.7 puts '()\n' where 3.x does not, other minor differences