Commit eed1661b authored by Terry Jan Reedy's avatar Terry Jan Reedy

Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins.

parent 681ede8b
...@@ -33,8 +33,16 @@ tc = TC() ...@@ -33,8 +33,16 @@ tc = TC()
signature = ct.get_argspec # 2.7 and 3.x use different functions signature = ct.get_argspec # 2.7 and 3.x use different functions
class Get_signatureTest(unittest.TestCase): 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): def test_builtins(self):
# These test will break if
# Python class that inherits builtin methods # Python class that inherits builtin methods
class List(list): "List() doc" class List(list): "List() doc"
# Simulate builtin with no docstring for default argspec test # Simulate builtin with no docstring for default argspec test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment