Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue22894

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:unittest.TestCase.subTest causes all subsequent tests to be skipped in failfast mode
Type:behaviorStage:resolved
Components:TestsVersions:Python 3.4, Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: Trey.Cucco, ethan.furman, ezio.melotti, michael.foord, pitrou, python-dev, rbcollins
Priority:normalKeywords:patch

Created on2014-11-17 22:18 byTrey.Cucco, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
utbug.pyTrey.Cucco,2014-11-17 22:18A python script demonstrating the bug
subtests_failfast.patchpitrou,2014-11-21 00:14review
Messages (4)
msg231305 -(view)Author: Trey Cucco (Trey.Cucco)Date: 2014-11-17 22:18
When running a test suite with the -f flag (--failfast), unittest seems to stop running tests once it exits a with self.subTest block.In the attached script, run it without -f and test_b will run and fail. Run it with the -f flag and only the test_a test will run. test_b will not run and no errors will be reported.I noticed this bug in 3.4.1 on OS X
msg231449 -(view)Author: Antoine Pitrou (pitrou)*(Python committer)Date: 2014-11-21 00:14
Here is a patch.
msg231468 -(view)Author: Michael Foord (michael.foord)*(Python committer)Date: 2014-11-21 09:20
Looks good, thanks for the quick response.
msg231562 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-11-23 15:01
New changeset993e8f795194 by Antoine Pitrou in branch '3.4':Issue#22894: TestCase.subTest() would cause the test suite to be stopped when in failfast mode, even in the absence of failures.https://hg.python.org/cpython/rev/993e8f795194New changeset04103cece49d by Antoine Pitrou in branch 'default':Issue#22894: TestCase.subTest() would cause the test suite to be stopped when in failfast mode, even in the absence of failures.https://hg.python.org/cpython/rev/04103cece49d
History
DateUserActionArgs
2022-04-11 14:58:10adminsetgithub: 67083
2014-11-23 15:06:40pitrousetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2014-11-23 15:01:31python-devsetnosy: +python-dev
messages: +msg231562
2014-11-21 09:20:40michael.foordsetmessages: +msg231468
2014-11-21 00:14:11pitrousetfiles: +subtests_failfast.patch
versions: + Python 3.5
messages: +msg231449

keywords: +patch
stage: patch review
2014-11-20 11:37:51michael.foordsetnosy: +pitrou
2014-11-18 22:18:44ethan.furmansetnosy: +ethan.furman
2014-11-17 22:35:48ned.deilysetnosy: +rbcollins,ezio.melotti,michael.foord, -ronaldoussoren,ned.deily
components: - macOS
2014-11-17 22:18:09Trey.Cuccocreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp