MCPcopy Index your code
hub / github.com/python/cpython / test_system_methods

Method test_system_methods

Lib/test/test_docxmlrpc.py:160–185  ·  view source on GitHub ↗

Test the presence of three consecutive system.* methods. This also tests their use of parameter type recognition and the systems related to that process.

(self)

Source from the content-addressed store, hash-verified

158 @make_request_and_skipIf(sys.flags.optimize >= 2,
159 "Docstrings are omitted with -O2 and above")
160 def test_system_methods(self):
161 """Test the presence of three consecutive system.* methods.
162
163 This also tests their use of parameter type recognition and the
164 systems related to that process.
165 """
166 self.client.request("GET", "/")
167 response = self.client.getresponse().read()
168
169 self.assertIn(
170 (b'<dl><dt><a name="-system.methodHelp"><strong>system.methodHelp'
171 b'</strong></a>(method_name)</dt><dd><tt><a href="#-system.method'
172 b'Help">system.methodHelp</a>(\'add\')&nbsp;=&gt;&nbsp;"Adds&nbsp;'
173 b'two&nbsp;integers&nbsp;together"<br>\n&nbsp;<br>\nReturns&nbsp;a'
174 b'&nbsp;string&nbsp;containing&nbsp;documentation&nbsp;for&nbsp;'
175 b'the&nbsp;specified&nbsp;method.</tt></dd></dl>\n<dl><dt><a name'
176 b'="-system.methodSignature"><strong>system.methodSignature</strong>'
177 b'</a>(method_name)</dt><dd><tt><a href="#-system.methodSignature">'
178 b'system.methodSignature</a>(\'add\')&nbsp;=&gt;&nbsp;[double,&nbsp;'
179 b'int,&nbsp;int]<br>\n&nbsp;<br>\nReturns&nbsp;a&nbsp;list&nbsp;'
180 b'describing&nbsp;the&nbsp;signature&nbsp;of&nbsp;the&nbsp;method.'
181 b'&nbsp;In&nbsp;the<br>\nabove&nbsp;example,&nbsp;the&nbsp;add&nbsp;'
182 b'method&nbsp;takes&nbsp;two&nbsp;integers&nbsp;as&nbsp;arguments'
183 b'<br>\nand&nbsp;returns&nbsp;a&nbsp;double&nbsp;result.<br>\n&nbsp;'
184 b'<br>\nThis&nbsp;server&nbsp;does&nbsp;NOT&nbsp;support&nbsp;system'
185 b'.methodSignature.</tt></dd></dl>'), response)
186
187 def test_autolink_dotted_methods(self):
188 """Test that selfdot values are made strong automatically in the

Callers

nothing calls this directly

Calls 4

assertInMethod · 0.80
requestMethod · 0.45
readMethod · 0.45
getresponseMethod · 0.45

Tested by

no test coverage detected