summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-12-30 14:08:03 +0100
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-12-30 14:08:03 +0100
commit874b5361d2972dd6feb2d26b74e37eba2434ba04 (patch)
tree39cda8086d705e184ed83db991d28e4d52a6337d /docs
parent02e4cfd9bb0e0d1124385f52108bb709fc5d72bf (diff)
downloadfactory-boy-874b5361d2972dd6feb2d26b74e37eba2434ba04.tar
factory-boy-874b5361d2972dd6feb2d26b74e37eba2434ba04.tar.gz
Document FuzzyInteger.step
Diffstat (limited to 'docs')
-rw-r--r--docs/changelog.rst9
-rw-r--r--docs/fuzzy.rst10
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 <https://github.com/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
------------