(rr)
| 377 | return -1 |
| 378 | |
| 379 | def check_pattern(rr): |
| 380 | choices = random.choices |
| 381 | p0 = ''.join(choices('abcde', k=rr(10))) * rr(10, 20) |
| 382 | p = p0[:len(p0) - rr(10)] # pop off some characters |
| 383 | left = ''.join(choices('abcdef', k=rr(2000))) |
| 384 | right = ''.join(choices('abcdef', k=rr(2000))) |
| 385 | text = left + p + right |
| 386 | with self.subTest(p=p, text=text): |
| 387 | self.checkequal(reference_find(p, text), |
| 388 | text, 'find', p) |
| 389 | |
| 390 | rr = random.randrange |
| 391 | for _ in range(1000): |
nothing calls this directly
no test coverage detected