diff options
author | Larry Hastings <larry@hastings.org> | 2014-01-24 14:17:25 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-01-24 14:17:25 (GMT) |
commit | 5c66189e88034ba807b10422a8750b0c71c4b62b (patch) | |
tree | 541626d6d627396acaccab565e936d35c3b99173 /Lib/idlelib | |
parent | b3c0f4067d992fc2c0d8578e308cc7167dc98f32 (diff) | |
download | cpython-5c66189e88034ba807b10422a8750b0c71c4b62b.zip cpython-5c66189e88034ba807b10422a8750b0c71c4b62b.tar.gz cpython-5c66189e88034ba807b10422a8750b0c71c4b62b.tar.bz2 |
Issue #20189: Four additional builtin types (PyTypeObject,
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/idle_test/test_calltips.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/idlelib/idle_test/test_calltips.py b/Lib/idlelib/idle_test/test_calltips.py index eca24ec..5b51732 100644 --- a/Lib/idlelib/idle_test/test_calltips.py +++ b/Lib/idlelib/idle_test/test_calltips.py @@ -55,24 +55,27 @@ class Get_signatureTest(unittest.TestCase): gtest(list.__new__, 'T.__new__(S, ...) -> a new object with type S, a subtype of T') gtest(list.__init__, - 'x.__init__(...) initializes x; see help(type(x)) for signature') + 'Initializes self. See help(type(self)) for accurate signature.') append_doc = "L.append(object) -> None -- append object to end" gtest(list.append, append_doc) gtest([].append, append_doc) gtest(List.append, append_doc) - gtest(types.MethodType, "method(function, instance)") + gtest(types.MethodType, "Create a bound instance method object.") gtest(SB(), default_tip) def test_multiline_docstring(self): # Test fewer lines than max. - self.assertEqual(signature(list), - "list() -> new empty list\n" - "list(iterable) -> new list initialized from iterable's items") + self.assertEqual(signature(dict), + "dict(mapping) -> new dictionary initialized from a mapping object's\n" + "(key, value) pairs\n" + "dict(iterable) -> new dictionary initialized as if via:\n" + "d = {}\n" + "for k, v in iterable:" + ) # Test max lines and line (currently) too long. self.assertEqual(signature(bytes), -"bytes(iterable_of_ints) -> bytes\n" "bytes(string, encoding[, errors]) -> bytes\n" "bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\n" #bytes(int) -> bytes object of size given by the parameter initialized with null bytes |