def mutate_text(self) -> bool: if Random.bool(): if docs.is_svg_text_element(self.name): self.last_text = Random.string() return True return False else: if self.parent is None or docs.is_svg_text_element( self.parent.name): self.ahead_text = Random.string() return True return False
def generate(self, _): self.value = "{{ \"{}\": \"{}\" }}".format(Random.string(), Random.string())
def generate_text(self): if docs.is_svg_text_element(self.name) and Random.selector(5) == 0: self.last_text = Random.string() if self.parent is None or docs.is_svg_text_element(self.parent.name) and \ Random.selector(5) == 0: self.ahead_text = Random.string()
def generate(self, _): self.value = Random.string()
def regex(): if Random.bool(): return Random.string() else: return Random.choice(["^\\d+$", "^[a-zA-Z0-9]*$", ".*"])
def accept(): return Random.choice([Random.string(), "audio/*", "video/*", "image/*"])
def generate(self, _): if len(self.strings): self.value = Random.choice(self.strings) else: self.value = Random.string()
def generate(self, _): self.value = "[\"{}\"]".format(Random.string())