]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase (GH-99646...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 22 Nov 2022 17:02:56 +0000 (19:02 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Nov 2022 17:02:56 +0000 (19:02 +0200)
commit9a7899b279b9eca2918925157e4a0b572579b081
tree5e184d340d252e40570a05e7291179a82f55021c
parent9a4b2f4f7f81d00ee562c344883828e5db96c973
[3.11] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase (GH-99646) (GH-99698)

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]