TST Add test for loc on sparse dataframes
Adds a test for loc on sparse dataframes.

- [x] closes #34687
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them

The test `pandas/tests/io/xml/test_xml.py::test_parser_consistency_url` seems to be failing, but I am not seeing how I am touching this code by just adding another test. Does anyone know how I would be able to fix this? > The test pandas/tests/io/xml/test_xml.py::test_parser_consistency_url seems to be failing, but I am not seeing how I am touching this code by just adding another test. Does anyone know how I would be able to fix this?

This is unrelated and OK to ignore here.  Just restarted that build. @EricLeer the pre-commit is failing if you can have a look thanks @EricLeer 