TST: Create test for #30122 about display.precision
- [x] closes #30122 
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry

I have merged master and pushed the code again. thanks @dhruvsamdani 