TST: Fix flakey hypothesis apply test 
Follow up based on comments in #23849

- [x] closes #24242
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

@mroeschke mind reviewing?

