REF/TST: Add more pytest idiom to resample/test_datetime_index.py
- [ n/a] xref #17806
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ n/a] whatsnew entry
