added test to indexing on groupby, #32464
- [x] closes #32464
- [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

This makes sure an index of a groupby with more then one column is always a MultiIndex.

I tried using `tm.assert_frame_equal` to test if a.groupby(["a", "b", "c"]).sum() has a MultiIndex like this:

```python
    a = DataFrame({"a": [], "b": [], "c": []})
    result = a.groupby(["a", "b", "c"]).sum()

    expected_index = MultiIndex.from_arrays([[], [], []], names=("a", "b", "c"))
    expected = DataFrame(
        np.ndarray((0, 0)), dtype="float64", index=expected_index, columns=Index([])
    )

    # Tests if groupby with all columns has a multiindex
    tm.assert_frame_equal(result, expected)
```

But it didn't work, so I'm keeping just the other assertion, that tests if both groupby's are equal. can you merge master and update to comments Yes, I was working on other stuff, will work on it now! Hm I don't really know why the check fail, can someone help me? can you merge master again and ping on green @jreback can you help me with the error? is worthwhile but needs to be passing (and pls merge master) @gabrieldi95 - The CI failure appears unrelated to me; can you try merging master again @gabrieldi95 can you merge master and address comments Closing to take this off the queue. @gabrieldi95 please let me know if you'd like to continue this! @rhshadrach sorry for taking so long! Yes, I would like to continue can you merge master can you merge master and update to comments Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in main and address the review and we can reopen.