Bring back the PR `Refactor doctests + add CI` to `main` (#23271)
* Revert "Revert "[Doctests] Refactor doctests + add CI" (#23245)"
This reverts commit 69ee46243c40ea61f63d4b8f78d171ad27b4a046.
* try not expose HfDocTestParser
* move into testing_utils.py
* remove pytest install
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>