[New-bugs-announce] [issue17492] Increase test coverage for random (up to 99%)

Víctor Terrón report at bugs.python.org
Wed Mar 20 04:02:50 CET 2013


New submission from Víctor Terrón:

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!

----------
components: Library (Lib)
files: test_random.diff
keywords: patch
messages: 184728
nosy: mark.dickinson, rhettinger, vterron
priority: normal
severity: normal
status: open
title: Increase test coverage for random (up to 99%)
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29498/test_random.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17492>
_______________________________________


More information about the New-bugs-announce mailing list