Coverage for /pythoncovmergedfiles/medio/medio/src/python-multipart/fuzz/helpers.py: 78%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

9 statements  

1import atheris 

2 

3 

4class EnhancedDataProvider(atheris.FuzzedDataProvider): 

5 def ConsumeRandomBytes(self) -> bytes: 

6 return self.ConsumeBytes(self.ConsumeIntInRange(0, self.remaining_bytes())) 

7 

8 def ConsumeRandomString(self) -> str: 

9 return self.ConsumeUnicodeNoSurrogates(self.ConsumeIntInRange(0, self.remaining_bytes())) 

10 

11 def ConsumeBool(self) -> bool: 

12 return bool(self.ConsumeInt(1))