This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Method stopTestRun() is not always called for skipped tests
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, michael.foord, miss-islington, rbcollins, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2021-08-19 11:58 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27831 merged serhiy.storchaka, 2021-08-19 12:12
PR 27881 merged miss-islington, 2021-08-22 07:34
PR 27882 merged miss-islington, 2021-08-22 07:34
Messages (4)
msg399911 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-08-19 11:58
Method startTestRun() is always called for the TestResult object implicitly created by TestCase.defaultTestResult() when no TestResult object is passed to TestCase.run(). But method stopTestRun() is not always called in pair with startTestRun() for skipped tests. It is only called if SkipTest was raised directly or indirectly (via skipTest()). It is not called if a skipping decorator (@skip, @skipIf, @skipUnless) was used for a method or a class.
msg400053 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-08-22 07:34
New changeset a9640d75531d6cbbfd254b65435f238c26bf5cd9 by Serhiy Storchaka in branch 'main':
bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831)
https://github.com/python/cpython/commit/a9640d75531d6cbbfd254b65435f238c26bf5cd9
msg400055 - (view) Author: miss-islington (miss-islington) Date: 2021-08-22 07:55
New changeset d63114caf9384ead7baf872598acdff25315a5bf by Miss Islington (bot) in branch '3.10':
bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831)
https://github.com/python/cpython/commit/d63114caf9384ead7baf872598acdff25315a5bf
msg400084 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-08-22 18:15
New changeset 4e5162fd369baf25dd16a42ccd0fa7756744f4d0 by Miss Islington (bot) in branch '3.9':
bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831) (GH-27882)
https://github.com/python/cpython/commit/4e5162fd369baf25dd16a42ccd0fa7756744f4d0
History
Date User Action Args
2022-04-11 14:59:48adminsetgithub: 89118
2021-08-22 18:18:44serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-08-22 18:15:18serhiy.storchakasetmessages: + msg400084
2021-08-22 07:55:41miss-islingtonsetmessages: + msg400055
2021-08-22 07:34:07miss-islingtonsetpull_requests: + pull_request26337
2021-08-22 07:34:04serhiy.storchakasetmessages: + msg400053
2021-08-22 07:34:02miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request26336
2021-08-19 12:12:38serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request26295
2021-08-19 11:58:46serhiy.storchakacreate