devtools/fill.py
branch3.0
changeset 428 7d80331a91d7
parent 0 b97547f5f1fa
child 1016 26387b836099
--- a/devtools/fill.py	Thu Jan 15 13:25:34 2009 +0100
+++ b/devtools/fill.py	Thu Jan 15 13:25:46 2009 +0100
@@ -136,6 +136,9 @@
         
     def generate_integer(self, attrname, index):
         """generates a consistent value for 'attrname' if it's an integer"""
+        choosed = self.generate_choice(attrname, index)
+        if choosed is not None:
+            return choosed
         minvalue, maxvalue = get_bounds(self.e_schema, attrname)
         if maxvalue is not None and maxvalue <= 0 and minvalue is None:
             minvalue = maxvalue - index # i.e. randint(-index, 0)