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: Increase test coverage for random (up to 99%)
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: ezio.melotti, mark.dickinson, python-dev, r.david.murray, rhettinger, vterron
Priority: normal Keywords: patch

Created on 2013-03-20 03:02 by vterron, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_random.diff vterron, 2013-03-20 03:02 review
Messages (3)
msg184728 - (view) Author: Víctor Terrón (vterron) * Date: 2013-03-20 03:02
I'm attaching a patch to increase the code coverage of the random module to 99% (only one line missing, see issue #17489; it's reported as 89%, however, because of the _test(N=2000) function, which is not executed when the unit tests are run). Many of the new tests, especially gammavariate(), involve mocking Random.random() so that it returns a series of fixed values that guarantee that all the branches of the algorithm are executed — hopefully this has been a good idea!
msg185846 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-04-02 16:48
New changeset 2a340f963518 by R David Murray in branch 'default':
#17492: Additional tests for random module.
http://hg.python.org/cpython/rev/2a340f963518
msg185847 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-04-02 16:48
Thanks, Victor.
History
Date User Action Args
2022-04-11 14:57:43adminsetgithub: 61694
2013-04-02 16:48:51r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg185847

resolution: fixed
stage: patch review -> resolved
2013-04-02 16:48:15python-devsetnosy: + python-dev
messages: + msg185846
2013-03-24 14:05:47ezio.melottisetnosy: + ezio.melotti

stage: patch review
2013-03-21 03:19:46rhettingersetassignee: rhettinger
2013-03-20 03:02:50vterroncreate