Skip to content

TST (string dtype): duplicate pandas/tests/indexes/object tests specifically for string dtypes #60117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jorisvandenbossche
Copy link
Member

We have some Index tests specifically for object dtype. Some of those will already get tested through the builds that enable the string dtype by default, but so this PR essentially duplicated those tests and:

  • updated the object dtype ones to explicitly use dtype=object, and deleted the ones that are specific to strings
  • for the duplicated ones that are relevant for strings, parametrized all tests for the various string dtypes (any_string_dtype fixture)

@jorisvandenbossche jorisvandenbossche added Testing pandas testing functions or related to the test suite Strings String extension data type and string data labels Oct 28, 2024
@@ -156,59 +155,3 @@ def test_get_indexer_non_unique_np_nats(self, np_nat_fixture, np_nat_fixture2):
expected_indexer = np.array([1, 3], dtype=np.intp)
tm.assert_numpy_array_equal(indexer, expected_indexer)
tm.assert_numpy_array_equal(missing, expected_missing)


class TestSliceLocs:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remaining tests here were already parametrized with any_string_dtype, so only keeping them in pandas/tests/indexes/string

@jorisvandenbossche jorisvandenbossche added this to the 2.3 milestone Oct 30, 2024
@jorisvandenbossche jorisvandenbossche merged commit d8905e4 into pandas-dev:main Oct 30, 2024
51 checks passed
@jorisvandenbossche jorisvandenbossche deleted the string-dtype-tests-indexes-string branch October 30, 2024 08:00
Copy link

lumberbot-app bot commented Oct 30, 2024

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.3.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 d8905e4bee2aa0e096ed7831fea7d395d7657120
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #60117: TST (string dtype): duplicate pandas/tests/indexes/object tests specifically for string dtypes'
  1. Push to a named branch:
git push YOURFORK 2.3.x:auto-backport-of-pr-60117-on-2.3.x
  1. Create a PR against branch 2.3.x, I would have named this PR:

"Backport PR #60117 on branch 2.3.x (TST (string dtype): duplicate pandas/tests/indexes/object tests specifically for string dtypes)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@jorisvandenbossche
Copy link
Member Author

Manual backport in #60131

jorisvandenbossche added a commit that referenced this pull request Oct 30, 2024
…bject tests specifically for string dtypes (#60117) (#60131)

TST (string dtype): duplicate pandas/tests/indexes/object tests specifically for string dtypes (#60117)

(cherry picked from commit d8905e4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Strings String extension data type and string data Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant