If one end up as the first item in a list the array dumping the array
will fail. There are xfail tests in test_range for it.
return (cls, choice(subtypes))
def make_Range(self, spec, empty_chance=0.02, no_bound_chance=0.05):
- if random() < empty_chance and spec[0] is Range:
+ # TODO: drop format check after fixing binary dumping of empty ranges
+ # (an array starting with an empty range will get the wrong type currently)
+ if (
+ random() < empty_chance
+ and spec[0] is Range
+ and self.format == PyFormat.TEXT
+ ):
return spec[0](empty=True)
while True: