From 874b5361d2972dd6feb2d26b74e37eba2434ba04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Barrois?= Date: Mon, 30 Dec 2013 14:08:03 +0100 Subject: Document FuzzyInteger.step --- docs/changelog.rst | 9 +++++++++ docs/fuzzy.rst | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index adb42a8..6658a96 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,15 @@ ChangeLog ========= +.. _v2.4.0: + +2.4.0 (master) +-------------- + +*New:* + + - Add support for :attr:`factory.fuzzy.FuzzyInteger.step`, thanks to `ilya-pirogov `_ (:issue:`120`) + .. _v2.3.0: 2.3.0 (2013-12-25) diff --git a/docs/fuzzy.rst b/docs/fuzzy.rst index b94dfa5..2fe60b8 100644 --- a/docs/fuzzy.rst +++ b/docs/fuzzy.rst @@ -73,7 +73,7 @@ FuzzyChoice FuzzyInteger ------------ -.. class:: FuzzyInteger(low[, high]) +.. class:: FuzzyInteger(low[, high[, step]]) The :class:`FuzzyInteger` fuzzer generates random integers within a given inclusive range. @@ -82,7 +82,7 @@ FuzzyInteger .. code-block:: pycon - >>> FuzzyInteger(0, 42) + >>> fi = FuzzyInteger(0, 42) >>> fi.low, fi.high 0, 42 @@ -98,6 +98,12 @@ FuzzyInteger int, the inclusive higher bound of generated integers + .. attribute:: step + + int, the step between values in the range; for instance, a ``FuzzyInteger(0, 42, step=3)`` + might only yield values from ``[0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42]``. + + FuzzyDecimal ------------ -- cgit v1.2.3