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.

Unsupported provider

classification
Title: test_dummy_thread.py test coverage improvement
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Ramchandra Apte, berker.peksag, brett.cannon, denversc, ezio.melotti, josephgordon, orsenthil, python-dev, sandro.tosi
Priority: normal Keywords: easy, patch

Created on 2011-03-15 05:31 by denversc, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_dummy_thread_test_coverage_improvement.patch denversc, 2011-03-15 05:31 review
test_dummy_thread_test_coverage_improvement_v2.patch denversc, 2011-03-15 05:34 ignore the previous patch; it had an unintentional change to support.py review
issue11551.patch orsenthil, 2016-09-07 09:43 review
issue11551.patch orsenthil, 2016-09-08 09:23 review
Messages (9)
msg130957 - (view) Author: Denver Coneybeare (denversc) * Date: 2011-03-15 05:31
The attached patch increases the test coverage of the module _dummy_thread from 78% to 100%.
msg139070 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2011-06-25 14:24
I run a review on rietveld, just minor stuff (even though I don't see the 100% coverage).
msg151641 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2012-01-19 16:18
Hi Denver, do you have the time to address the review on rietveld and propose a new patch?
msg151760 - (view) Author: Denver Coneybeare (denversc) * Date: 2012-01-22 04:29
I've looked at the review (thanks for the review) and can submit an updated patch.  I don't have the Python source code pulled down to my PC anymore so it might take a week or two before I'm able to update the patch and test it out.  I imagine that's not too much of a problem though :)
msg223332 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-17 13:06
@Denver are you still interested in working on this as a week or two has passed? :)
msg258751 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-01-21 10:07
Thanks for the patch, Denver.

Two things:

1. MockFunction needs to be replaced with unittest.mock.Mock.
2. Comments from Sandro and Ezio needs to be addressed.
msg274785 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2016-09-07 09:43
I've updated the patch to use unittest.mock, the removed the old style way of exercising it.
msg274989 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2016-09-08 09:23
Here is an updated patch that increases the coverage to 100% and has some pep8 style improvements.


shannon-2:issue11551 senthil$ ./python.exe -m test.regrtest test_dummy_thread
Run tests sequentially
0:00:00 [1/1] test_dummy_thread
1 test OK.

Total duration: 23 ms
Tests result: SUCCESS

shannon-2:issue11551 senthil$ ./python.exe -m coverage run --pylib --source=_dummy_thread Lib/test/regrtest.py test_dummy_thread
Run tests sequentially
0:00:00 [1/1] test_dummy_thread
1 test OK.

Total duration: 82 ms
Tests result: SUCCESS

shannon-2:issue11551 senthil$ ./python.exe -m coverage report --show-missing
Name                   Stmts   Miss  Cover   Missing
----------------------------------------------------
Lib/_dummy_thread.py      64      0   100%


Since these are restricted to test improvements and have addressed the comments from previous reviews, I am going ahead with committing this patch. If there are any further comments, we can address them in subsequent commits.
msg274995 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-08 09:48
New changeset 08f446bf45a7 by Senthil Kumaran in branch '3.5':
Issue11551 - Increase the test coverage of _dummy_thread module to 100%.
https://hg.python.org/cpython/rev/08f446bf45a7

New changeset d69e0df64b11 by Senthil Kumaran in branch 'default':
[merge from 3.5] Issue11551 - Increase the test coverage of _dummy_thread module to 100%.
https://hg.python.org/cpython/rev/d69e0df64b11
History
Date User Action Args
2022-04-11 14:57:14adminsetgithub: 55760
2016-09-08 09:48:51orsenthilsetstatus: open -> closed
resolution: fixed
stage: needs patch -> resolved
2016-09-08 09:48:08python-devsetnosy: + python-dev
messages: + msg274995
2016-09-08 09:23:41orsenthilsetfiles: + issue11551.patch

messages: + msg274989
2016-09-07 09:43:59orsenthilsetfiles: + issue11551.patch
nosy: + orsenthil
messages: + msg274785

2016-01-21 19:24:14BreamoreBoysetnosy: - BreamoreBoy
2016-01-21 10:07:01berker.peksagsetversions: + Python 3.5, Python 3.6, - Python 3.3, Python 3.4
nosy: + berker.peksag

messages: + msg258751

stage: patch review -> needs patch
2015-12-14 02:16:04josephgordonsetnosy: + josephgordon
2014-07-17 13:56:18brian.curtinsetnosy: - brian.curtin
2014-07-17 13:06:59BreamoreBoysetnosy: + BreamoreBoy
messages: + msg223332
2013-01-22 12:33:16ezio.melottisetkeywords: + easy
nosy: + ezio.melotti, Ramchandra Apte
stage: patch review

versions: + Python 3.4
2012-01-22 04:29:28denverscsetmessages: + msg151760
2012-01-19 16:18:35sandro.tosisetmessages: + msg151641
2011-06-25 14:24:00sandro.tosisetnosy: + sandro.tosi
messages: + msg139070
2011-03-15 05:36:49denverscsetnosy: + brett.cannon
2011-03-15 05:34:20denverscsetfiles: + test_dummy_thread_test_coverage_improvement_v2.patch
nosy: brian.curtin, denversc
2011-03-15 05:31:15denversccreate