]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.10] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase (GH-99646...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 22 Nov 2022 17:11:57 +0000 (19:11 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Nov 2022 17:11:57 +0000 (19:11 +0200)
commit400d41b8ea73e71ca583daca94da3db06417f210
tree526b11eefc02dfb811a4e64026c084a9823db180
parent190331ed280ba292dc3d0419f65ed2ecf12aa06e
[3.10] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase (GH-99646) (GH-99699)

Now addClassCleanup() uses separate lists for different TestCase subclasses,
and doClassCleanups() only cleans up the particular class.

(cherry picked from commit c2102136be569e6fc8ed90181f229b46d07142f8)
Lib/unittest/case.py
Lib/unittest/test/test_runner.py
Misc/NEWS.d/next/Library/2022-11-21-13-49-03.gh-issue-99645.9w1QKq.rst [new file with mode: 0644]