[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2021-09-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2021-09-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 664448d81f41c5fa971d8523a71b0f19e76cc136 by Serhiy Storchaka in 
branch 'main':
bpo-30856: Update TestResult early, without buffering in _Outcome (GH-28180)
https://github.com/python/cpython/commit/664448d81f41c5fa971d8523a71b0f19e76cc136


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2021-09-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Before b3468f79efa45c8adaf86c0b9b797b9b3d4c12a2 the TestResult methods 
(addFailure, addError, addSkip, addExpectedFailure, addUnexpectedSuccess) were 
called immediately after running the test method. After that change all skips, 
failures and errors were accumulated separately and TestResult was updated only 
after the test cleanup. I do not know whether there were reasons for this or it 
is just an implementation artifact.

The proposed PR makes addFailure, addError, addSkip and addSubTest be called 
immediately after raising an exception or finishing a subtest. 
addExpectedFailure, addUnexpectedSuccess and addSuccess still need to wait the 
end of the test cleanup.

--
versions: +Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2021-09-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 4.0 -> 5.0
pull_requests: +26606
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28180

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2017-07-07 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +ezio.melotti, michael.foord, rbcollins

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2017-07-05 Thread Sergey Fedoseev

Changes by Sergey Fedoseev :


--
components: +Library (Lib)

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2017-07-05 Thread Sergey Fedoseev

New submission from Sergey Fedoseev:

Currently TestResult.addSubTest() is called just before TestResult.stopTest(), 
but docs says that addSubTest is "Called when a subtest finishes". IMO that 
means that it will be called immediately after subtest finishes, but not after 
indefinite time.

Test is attached.

--
files: test_subtest.py
messages: 297756
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: unittest.TestResult.addSubTest should be called immediately after 
subtest finishes
type: behavior
Added file: http://bugs.python.org/file46990/test_subtest.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com