Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Regenerate static strings for docxmlrpc and pydoc tests
  • Loading branch information
isidentical committed Oct 1, 2020
commit fdcea4db7abd2be8829bf88c35dade5cb6000355
4 changes: 2 additions & 2 deletions Lib/test/test_docxmlrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ def test_annotations(self):
b'<dd><tt>Use&nbsp;function&nbsp;annotations.</tt></dd>')
self.assertIn(
(b'<dl><dt><a name="-annotation"><strong>annotation</strong></a>'
b'(x: int)</dt>' + docstring + b'</dl>\n'
b'(x: \'int\')</dt>' + docstring + b'</dl>\n'
b'<dl><dt><a name="-method_annotation"><strong>'
b'method_annotation</strong></a>(x: bytes)</dt></dl>'),
b'method_annotation</strong></a>(x: \'bytes\')</dt></dl>'),
Comment thread
isidentical marked this conversation as resolved.
Outdated
response.read())

def test_server_title_escape(self):
Expand Down
8 changes: 4 additions & 4 deletions Lib/test/test_pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class B(builtins.object)
|\x20\x20
| NO_MEANING = 'eggs'
|\x20\x20
| __annotations__ = {'NO_MEANING': <class 'str'>}
| __annotations__ = {'NO_MEANING': 'str'}
\x20\x20\x20\x20
class C(builtins.object)
| Methods defined here:
Expand Down Expand Up @@ -194,7 +194,7 @@ class C(builtins.object)
Data and other attributes defined here:<br>
<dl><dt><strong>NO_MEANING</strong> = 'eggs'</dl>

<dl><dt><strong>__annotations__</strong> = {'NO_MEANING': &lt;class 'str'&gt;}</dl>
<dl><dt><strong>__annotations__</strong> = {'NO_MEANING': 'str'}</dl>

</td></tr></table> <p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
Expand Down Expand Up @@ -1055,8 +1055,8 @@ def foo(data: typing.List[typing.Any],
T = typing.TypeVar('T')
class C(typing.Generic[T], typing.Mapping[int, str]): ...
self.assertEqual(pydoc.render_doc(foo).splitlines()[-1],
'f\x08fo\x08oo\x08o(data: List[Any], x: int)'
' -> Iterator[Tuple[int, Any]]')
'f\x08fo\x08oo\x08o(data: \'typing.List[typing.Any]\', x: \'int\')'
' -> \'typing.Iterator[typing.Tuple[int, typing.Any]]\'')
self.assertEqual(pydoc.render_doc(C).splitlines()[2],
'class C\x08C(collections.abc.Mapping, typing.Generic)')

Expand Down