[Python-checkins] cpython (2.7): Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins.
terry.reedy
python-checkins at python.org
Tue Jan 21 09:10:25 CET 2014
http://hg.python.org/cpython/rev/779e5511d803
changeset: 88604:779e5511d803
branch: 2.7
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Tue Jan 21 03:07:43 2014 -0500
summary:
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'.
files:
Lib/idlelib/idle_test/test_calltips.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Lib/idlelib/idle_test/test_calltips.py b/Lib/idlelib/idle_test/test_calltips.py
--- a/Lib/idlelib/idle_test/test_calltips.py
+++ b/Lib/idlelib/idle_test/test_calltips.py
@@ -34,6 +34,13 @@
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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list