From ac31da8f3710f9f9b8dbb4c36b2108fb1e5b4a48 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 11 Apr 2019 19:37:53 +0900 Subject: [PATCH] bpo-36597: fix random doctest failure (GH-12778) --- Doc/library/weakref.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst index 40bb06adfd44..7f3d267d74c2 100644 --- a/Doc/library/weakref.rst +++ b/Doc/library/weakref.rst @@ -489,11 +489,14 @@ Unless you set the :attr:`~finalize.atexit` attribute to :const:`False`, a finalizer will be called when the program exits if it is still alive. For instance - >>> obj = Object() - >>> weakref.finalize(obj, print, "obj dead or exiting") #doctest:+ELLIPSIS - - >>> exit() #doctest:+SKIP - obj dead or exiting +.. doctest:: + :options: +SKIP + + >>> obj = Object() + >>> weakref.finalize(obj, print, "obj dead or exiting") + + >>> exit() + obj dead or exiting Comparing finalizers with :meth:`__del__` methods -- 2.47.3