From ed1160b39c23c4b035b6c203cc6df53274d08939 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 7 Jun 2014 16:44:00 -0700 Subject: don't remove self from example code in the HTML output (closes #13223) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Víctor Terrón. --- Lib/test/test_pydoc.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'Lib/test/test_pydoc.py') diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index f26fb15f53..188c4c26fe 100644 --- a/Lib/test/test_pydoc.py +++ b/Lib/test/test_pydoc.py @@ -47,6 +47,7 @@ CLASSES builtins.object A B + C \x20\x20\x20\x20 class A(builtins.object) | Hello and goodbye @@ -74,6 +75,26 @@ CLASSES | Data and other attributes defined here: |\x20\x20 | NO_MEANING = 'eggs' +\x20\x20\x20\x20 + class C(builtins.object) + | Methods defined here: + |\x20\x20 + | get_answer(self) + | Return say_no() + |\x20\x20 + | is_it_true(self) + | Return self.get_answer() + |\x20\x20 + | say_no(self) + |\x20\x20 + | ---------------------------------------------------------------------- + | Data descriptors defined here: + |\x20\x20 + | __dict__ + | dictionary for instance variables (if defined) + |\x20\x20 + | __weakref__ + | list of weak references to the object (if defined) FUNCTIONS doc_func() @@ -124,6 +145,7 @@ expected_html_pattern = """
A
B +
C
@@ -165,6 +187,28 @@ Data descriptors defined here:
Data and other attributes defined here:
NO_MEANING = 'eggs'
+

+ + + +\x20\x20\x20\x20 + +
 
+class C(builtins.object)
    Methods defined here:
+
get_answer(self)
Return say_no()
+ +
is_it_true(self)
Return self.get_answer()
+ +
say_no(self)
+ +
+Data descriptors defined here:
+
__dict__
+
dictionary for instance variables (if defined)
+
+
__weakref__
+
list of weak references to the object (if defined)
+

-- cgit v1.2.1