Skip to content

Commit 29ef7e6

Browse files
Fix doctests.
1 parent 5da1f0b commit 29ef7e6

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Doc/library/functools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ The :mod:`functools` module defines the following functions:
548548
attribute::
549549

550550
>>> fun.registry.keys()
551-
dict_keys([<class 'NoneType'>, <class 'int'>, <class 'object'>,
551+
dict_keys([<class 'types.NoneType'>, <class 'int'>, <class 'object'>,
552552
<class 'decimal.Decimal'>, <class 'list'>,
553553
<class 'float'>])
554554
>>> fun.registry[float]

Doc/library/multiprocessing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,9 @@ process which created it.
460460
Traceback (most recent call last):
461461
Traceback (most recent call last):
462462
Traceback (most recent call last):
463-
AttributeError: 'module' object has no attribute 'f'
464-
AttributeError: 'module' object has no attribute 'f'
465-
AttributeError: 'module' object has no attribute 'f'
463+
AttributeError: 'types.ModuleType' object has no attribute 'f'
464+
AttributeError: 'types.ModuleType' object has no attribute 'f'
465+
AttributeError: 'types.ModuleType' object has no attribute 'f'
466466

467467
(If you try this it will actually output three full tracebacks
468468
interleaved in a semi-random fashion, and then you may have to

Doc/library/multiprocessing.shared_memory.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ instance:
300300
>>> from multiprocessing import shared_memory
301301
>>> a = shared_memory.ShareableList(['howdy', b'HoWdY', -273.154, 100, None, True, 42])
302302
>>> [ type(entry) for entry in a ]
303-
[<class 'str'>, <class 'bytes'>, <class 'float'>, <class 'int'>, <class 'NoneType'>, <class 'bool'>, <class 'int'>]
303+
[<class 'str'>, <class 'bytes'>, <class 'float'>, <class 'int'>, <class 'types.NoneType'>, <class 'bool'>, <class 'int'>]
304304
>>> a[2]
305305
-273.154
306306
>>> a[2] = -78.5

Doc/library/unittest.mock.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ object::
890890
...
891891
>>> mock = MagicMock(async_func)
892892
>>> mock
893-
<MagicMock spec='function' id='...'>
893+
<MagicMock spec='FunctionType' id='...'>
894894
>>> mock() # doctest: +SKIP
895895
<coroutine object AsyncMockMixin._mock_call at ...>
896896

0 commit comments

Comments
 (0)