-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
[ArrowStringArray] TST: parametrize str.extract tests #41393
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, some suggestions for followons.
|
||
# two normal groups, one non-capturing group | ||
result = Series(["A11", "B22", "C33"]).str.extract( | ||
"([AB])([123])(?:[123])", expand=False | ||
s = Series(["A11", "B22", "C33"], dtype=any_string_dtype) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to break up really long tests like this (followon), unless easy to view in the same one
pandas/tests/strings/test_extract.py
Outdated
|
||
@pytest.mark.parametrize( | ||
"index", | ||
[ | ||
tm.makeStringIndex, | ||
tm.makeUnicodeIndex, | ||
tm.makeIntIndex, | ||
tm.makeDateIndex, | ||
tm.makePeriodIndex, | ||
tm.makeRangeIndex, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in followon if can use the existing fixtures
pandas/tests/strings/test_extract.py
Outdated
s_or_idx.str.extract("(?:[AB]).*", expand=True) | ||
|
||
|
||
@pytest.mark.parametrize("klass", [Series, Index]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we have a parameterization for this (followon)
cc @jorisvandenbossche if any comments (though prob easier to comment and handle in followon) |
thanks @simonjayhawkins |
No description provided.