(rr)
| 332 | return -1 |
| 333 | |
| 334 | def check_pattern(rr): |
| 335 | choices = random.choices |
| 336 | p0 = ''.join(choices('abcde', k=rr(10))) * rr(10, 20) |
| 337 | p = p0[:len(p0) - rr(10)] # pop off some characters |
| 338 | left = ''.join(choices('abcdef', k=rr(2000))) |
| 339 | right = ''.join(choices('abcdef', k=rr(2000))) |
| 340 | text = left + p + right |
| 341 | with self.subTest(p=p, text=text): |
| 342 | self.checkequal(reference_find(p, text), |
| 343 | text, 'find', p) |
| 344 | |
| 345 | rr = random.randrange |
| 346 | for _ in range(1000): |
nothing calls this directly
no test coverage detected