Test that annotations works as expected
(self)
| 194 | response.read()) |
| 195 | |
| 196 | def test_annotations(self): |
| 197 | """ Test that annotations works as expected """ |
| 198 | self.client.request("GET", "/") |
| 199 | response = self.client.getresponse() |
| 200 | docstring = (b'' if sys.flags.optimize >= 2 else |
| 201 | b'<dd><tt>Use function annotations.</tt></dd>') |
| 202 | self.assertIn( |
| 203 | (b'<dl><dt><a name="-annotation"><strong>annotation</strong></a>' |
| 204 | b'(x: int)</dt>' + docstring + b'</dl>\n' |
| 205 | b'<dl><dt><a name="-method_annotation"><strong>' |
| 206 | b'method_annotation</strong></a>(x: bytes)</dt></dl>'), |
| 207 | response.read()) |
| 208 | |
| 209 | def test_server_title_escape(self): |
| 210 | # bpo-38243: Ensure that the server title and documentation |
nothing calls this directly
no test coverage detected