TST: Get tests to run and fix them to pass
State: closed

NOTE: `test_metadata_propagation` is still not fixed yet in this draft pull request

Changed the class name from `Generic` to `TestGeneric` in order to get the test to run and then fixed five groups of tests (`test_rename`, `test_get_numeric_data`, `test_frame_or_series_compound_dtypes`, `test_metadata_propagation`, `test_api_compat`) in order to make sure that all of the tests pass.

- [x] closes #50380
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).


Labels:
name: Testing
description: pandas testing functions or related to the test suite

Comments:
@MarcoGorelli Thank you for your patience, I'm learning a lot. The work is explained in the description above. There are five groups of tests that weren't passing and four of them are fixed.

`test_metadata_propagation` on `Line 174` still isn't fixed. I understand the basic idea, that we are assigning `name` variables to sets of data and then passing those sets of data through operations and making sure that the metadata is still the same. I know that `assert_metadata_equivalent` always needs to compare two sets of data, and sometimes here the second set is not added yet, but I can't figure out yet what to add. I'm sure that I can get it with some more time, but I've taken a long time already, so feel free to do it if you want.

Also, the `reset_index(drop=True)` on `Line 96` works to get the test using a `Series` in `test_get_numeric_data`  to pass, but it seems like there might be some cleaner way.
@MarcoGorelli Whoa, you're the best, thank you for the guidance. The advice to find which PR last touched the code and then investigate it should be very helpful for me in the future, thank you. I updated the code and the tests all pass now!

I didn't add anything to the `doc/source/whatsnew/vX.X.X.rst` because I thought that maybe this is too small of an issue, but I can if you think it's a good idea. Let me know.

Also, after my initial commit, I got some e-mails saying that various checks in CI were failing, is that normal?

Of course, feel free to let me know if there is anything else that needs to be changed.
@MarcoGorelli Great, thank you for the reminder about reading about the failed check. On a similar note, there is already a failed check here, but it's something about Ubuntu that is failing on a lot of other pull requests from other people I noticed.

I'm trying to read about the meaning of the `|` and `(?x)` in `exclude` in `YAML` in order to better understand what I'm doing, but I went ahead and deleted all three lines because it seems like that's what you were asking for.
> thanks @phershbe - can you mark as ready for review please? should be good to go
> 
> for `exclude`, check the pre-commit docs

@MarcoGorelli I'll wait for the response on the part that's blocking in the comment above before marking as ready because maybe that will inform another reviewer that it's ready I guess, but I'll check back in a few hours at the end of the night and again in the morning and mark it ready when you let me know so that it can get finished since it has taken me so long.
@MarcoGorelli Thank you, I'm on it, doing it now
@MarcoGorelli Okay, I think everything should be ready now. I was a little bit confused because your message here in the conversation was a comment about a comment in the files changed tab about adding a comment to the code ... it's clear enough though, it's my inexperience. I added the comment above `Line 91`, I didn't know if it would be more appropriate there or above `Line 97`, so feel free to move it if necessary.