Remove bare exceptions from 'pandas/tests' to decrease flake8 E722 warnings
Closes #22872

In my experience, the main reson to not catch bare exception is that thet progam has no way of using distinguisging keyboard exception (`crtl + C`) from regular exception. So I opted for 

```python
except Exception:
```

in cases where it's not clear what exception may happen or function wrapped in a try-except is so large that basically any exception can in different situations happen.

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