changeset: 88605:4a505a901b2e branch: 3.3 parent: 88601:7befcc353d40 user: Terry Jan Reedy date: Tue Jan 21 03:07:51 2014 -0500 files: Lib/idlelib/idle_test/test_calltips.py description: Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins. diff -r 7befcc353d40 -r 4a505a901b2e Lib/idlelib/idle_test/test_calltips.py --- a/Lib/idlelib/idle_test/test_calltips.py Tue Jan 21 00:26:21 2014 -0500 +++ b/Lib/idlelib/idle_test/test_calltips.py Tue Jan 21 03:07:51 2014 -0500 @@ -33,8 +33,16 @@ signature = ct.get_argspec # 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 inspect or 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): + # These test will break if + # Python class that inherits builtin methods class List(list): "List() doc" # Simulate builtin with no docstring for default argspec test