summaryrefslogtreecommitdiff
path: root/ricky/param/constrainednumber.py
diff options
context:
space:
mode:
Diffstat (limited to 'ricky/param/constrainednumber.py')
-rw-r--r--ricky/param/constrainednumber.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ricky/param/constrainednumber.py b/ricky/param/constrainednumber.py
index 3563d22..3af3bf9 100644
--- a/ricky/param/constrainednumber.py
+++ b/ricky/param/constrainednumber.py
@@ -73,7 +73,9 @@ class ConstrainedNumber(Param):
value = int(value)
self.value = value
- def randomize(self, tries=0):
+ def randomize(self, tries=0, probabilities=None):
+ if probabilities and self._choose_from_probabilities(probabilities):
+ return
tries_max = 30
try:
self._generate_random()