From e51937055b2f8286283f449d610dbd35e160df00 Mon Sep 17 00:00:00 2001 From: Conchylicultor Date: Mon, 11 Jan 2021 18:28:29 +0100 Subject: [PATCH 1/2] Fix addCleanupClass -> addCleanupClass typo --- Doc/library/unittest.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 0a0993518efddc..73795ed1598e7e 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -1498,7 +1498,7 @@ Test cases after :meth:`setUpClass` if :meth:`setUpClass` raises an exception. It is responsible for calling all the cleanup functions added by - :meth:`addCleanupClass`. If you need cleanup functions to be called + :meth:`addClassCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDownClass` then you can call :meth:`doCleanupsClass` yourself. From e1410f45e22e41f53ffd6547351c1284cffee205 Mon Sep 17 00:00:00 2001 From: Conchylicultor Date: Tue, 12 Jan 2021 15:32:22 +0100 Subject: [PATCH 2/2] Fix typo doCleanupsClass -> doClassCleanups --- Doc/library/unittest.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 73795ed1598e7e..bb229f0bf9ce0e 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -1500,9 +1500,9 @@ Test cases It is responsible for calling all the cleanup functions added by :meth:`addClassCleanup`. If you need cleanup functions to be called *prior* to :meth:`tearDownClass` then you can call - :meth:`doCleanupsClass` yourself. + :meth:`doClassCleanups` yourself. - :meth:`doCleanupsClass` pops methods off the stack of cleanup + :meth:`doClassCleanups` pops methods off the stack of cleanup functions one at a time, so it can be called at any time. .. versionadded:: 3.8