(self)
| 421 | self.checkequal(1, haystack + needle, 'count', needle) |
| 422 | |
| 423 | def test_find_with_memory(self): |
| 424 | # Test the "Skip with memory" path in the two-way algorithm. |
| 425 | for N in 1000, 3000, 10_000, 30_000: |
| 426 | needle = 'ab' * N |
| 427 | haystack = ('ab'*(N-1) + 'b') * 2 |
| 428 | self.checkequal(-1, haystack, 'find', needle) |
| 429 | self.checkequal(0, haystack, 'count', needle) |
| 430 | self.checkequal(len(haystack), haystack + needle, 'find', needle) |
| 431 | self.checkequal(1, haystack + needle, 'count', needle) |
| 432 | |
| 433 | def test_find_shift_table_overflow(self): |
| 434 | """When the table of 8-bit shifts overflows.""" |
nothing calls this directly
no test coverage detected