Returns a random string of length (length >= 0)
(length)
| 680 | |
| 681 | |
| 682 | def randstring(length): |
| 683 | # type: (int) -> bytes |
| 684 | """ |
| 685 | Returns a random string of length (length >= 0) |
| 686 | """ |
| 687 | return b"".join(struct.pack('B', random.randint(0, 255)) |
| 688 | for _ in range(length)) |
| 689 | |
| 690 | |
| 691 | def zerofree_randstring(length): |
no test coverage detected
searching dependent graphs…