[3.11] gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (… (#110183)

gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (#110170)

(cherry picked from commit 06faa9a39bd93c5e7999d52b52043ecdd0774dac)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
1 file changed