mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix a bunch of doctests with the -d option of refactor.py.
We still have 27 failing tests (down from 39).
This commit is contained in:
parent
4502c804b9
commit
7131f84400
24 changed files with 217 additions and 217 deletions
|
@ -1072,7 +1072,7 @@ libreftest = """ Doctest for examples in the library reference: libweakref.tex
|
|||
...
|
||||
>>> obj = Dict(red=1, green=2, blue=3) # this object is weak referencable
|
||||
>>> r = weakref.ref(obj)
|
||||
>>> print r() is obj
|
||||
>>> print(r() is obj)
|
||||
True
|
||||
|
||||
>>> import weakref
|
||||
|
@ -1085,7 +1085,7 @@ True
|
|||
>>> o is o2
|
||||
True
|
||||
>>> del o, o2
|
||||
>>> print r()
|
||||
>>> print(r())
|
||||
None
|
||||
|
||||
>>> import weakref
|
||||
|
@ -1140,9 +1140,9 @@ True
|
|||
>>> try:
|
||||
... id2obj(a_id)
|
||||
... except KeyError:
|
||||
... print 'OK'
|
||||
... print('OK')
|
||||
... else:
|
||||
... print 'WeakValueDictionary error'
|
||||
... print('WeakValueDictionary error')
|
||||
OK
|
||||
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue