Skip to content
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

TST: move .str-test to strings.py & parametrize it; precursor to #23582 #23777

Merged
merged 1 commit into from
Nov 20, 2018

Conversation

h-vetinari
Copy link
Contributor

In #23582, I'm testing all string methods on all inferred dtypes (which uncovered lots of bugs that will be fixed by #23167 and follow-ups).

@jreback required #23582 to be broken up further, so here I'm moving one existing test that effectively uses the same idea to the (IMO) correct module (it's about testing the .str-accessor after all), where the any_string_method fixture can then be used for both the test I'm moving in this PR, and the tests I'm introducing in #23582.

It makes sense to have this fixture that's directly related to .str in the appropriate module, and not pollute the general pandas/conftest.py with it, that's mainly why I'm moving the test.

@pep8speaks
Copy link

Hello @h-vetinari! Thanks for submitting the PR.

Line 30:12: E241 multiple spaces after ','
Line 30:26: E241 multiple spaces after ','
Line 31:12: E241 multiple spaces after ','
Line 33:15: E241 multiple spaces after ','
Line 33:29: E241 multiple spaces after ','
Line 34:17: E241 multiple spaces after ','
Line 34:30: E241 multiple spaces after ','
Line 35:14: E241 multiple spaces after ','
Line 35:30: E241 multiple spaces after ','
Line 36:15: E241 multiple spaces after ','
Line 36:34: E241 multiple spaces after ','
Line 37:15: E241 multiple spaces after ','
Line 37:34: E241 multiple spaces after ','
Line 38:17: E241 multiple spaces after ','
Line 38:30: E241 multiple spaces after ','
Line 39:16: E241 multiple spaces after ','
Line 39:37: E241 multiple spaces after ','
Line 40:16: E241 multiple spaces after ','
Line 40:37: E241 multiple spaces after ','
Line 41:19: E241 multiple spaces after ','
Line 41:37: E241 multiple spaces after ','
Line 42:13: E241 multiple spaces after ','
Line 42:30: E241 multiple spaces after ','
Line 43:16: E241 multiple spaces after ','
Line 43:30: E241 multiple spaces after ','
Line 44:12: E241 multiple spaces after ','
Line 44:28: E241 multiple spaces after ','
Line 47:14: E241 multiple spaces after ','
Line 47:29: E241 multiple spaces after ','
Line 48:13: E241 multiple spaces after ','
Line 48:30: E241 multiple spaces after ','
Line 49:14: E241 multiple spaces after ','
Line 49:29: E241 multiple spaces after ','
Line 50:14: E241 multiple spaces after ','
Line 50:30: E241 multiple spaces after ','
Line 51:18: E241 multiple spaces after ','
Line 51:32: E241 multiple spaces after ','
Line 52:12: E241 multiple spaces after ','
Line 52:29: E241 multiple spaces after ','
Line 53:18: E241 multiple spaces after ','
Line 53:30: E241 multiple spaces after ','
Line 54:18: E241 multiple spaces after ','
Line 54:30: E241 multiple spaces after ','
Line 55:15: E241 multiple spaces after ','
Line 55:28: E241 multiple spaces after ','
Line 56:16: E241 multiple spaces after ','
Line 56:35: E241 multiple spaces after ','
Line 57:14: E241 multiple spaces after ','
Line 57:30: E241 multiple spaces after ','
Line 58:15: E241 multiple spaces after ','
Line 58:29: E241 multiple spaces after ','
Line 59:14: E241 multiple spaces after ','
Line 59:29: E241 multiple spaces after ','
Line 60:19: E241 multiple spaces after ','
Line 60:30: E241 multiple spaces after ','
Line 61:19: E241 multiple spaces after ','
Line 61:30: E241 multiple spaces after ','
Line 62:14: E241 multiple spaces after ','
Line 62:31: E241 multiple spaces after ','
Line 63:36: E241 multiple spaces after ','
Line 64:14: E241 multiple spaces after ','
Line 64:30: E241 multiple spaces after ','
Line 65:14: E241 multiple spaces after ','
Line 65:30: E241 multiple spaces after ','
Line 66:19: E241 multiple spaces after ','
Line 66:30: E241 multiple spaces after ','
Line 68:18: E241 multiple spaces after ','
Line 68:36: E241 multiple spaces after ','
Line 69:13: E241 multiple spaces after ','
Line 69:28: E241 multiple spaces after ','
Line 70:14: E241 multiple spaces after ','
Line 70:29: E241 multiple spaces after ','

@h-vetinari
Copy link
Contributor Author

Failure is rank segfault...

@jreback jreback added Testing pandas testing functions or related to the test suite Strings String extension data type and string data labels Nov 20, 2018
@jreback jreback added this to the 0.24.0 milestone Nov 20, 2018
@jreback jreback merged commit c9c9912 into pandas-dev:master Nov 20, 2018
@jreback
Copy link
Contributor

jreback commented Nov 20, 2018

thanks @h-vetinari

thoo added a commit to thoo/pandas that referenced this pull request Nov 20, 2018
…fixed

* upstream/master:
  DOC: more consistent flake8-commands in contributing.rst (pandas-dev#23724)
  DOC: Fixed the doctsring for _set_axis_name (GH 22895) (pandas-dev#22969)
  DOC: Improve GL03 message re: blank lines at end of docstrings. (pandas-dev#23649)
  TST: add tests for keeping dtype in Series.update (pandas-dev#23604)
  TST: For GH4861, Period and datetime in multiindex (pandas-dev#23776)
  TST: move .str-test to strings.py & parametrize it; precursor to pandas-dev#23582 (pandas-dev#23777)
  STY: isort tests/scalar, tests/tslibs, import libwindow instead of _window (pandas-dev#23787)
  BUG: fixed .str.contains(..., na=False) for categorical series (pandas-dev#22170)
  BUG: Maintain column order with groupby.nth (pandas-dev#22811)
  API/DEPR: replace kwarg "pat" with "sep" in str.[r]partition (pandas-dev#23767)
  CLN: Finish isort core (pandas-dev#23765)
  TST: Mark test_pct_max_many_rows with pytest.mark.single (pandas-dev#23799)
@h-vetinari h-vetinari deleted the str_coverage_precursor branch November 20, 2018 06:36
@h-vetinari
Copy link
Contributor Author

@jreback Thanks!
I think I'll have a celebratory drink tonight for my first PR that went straight through without having to incorporate review feedback. ;-)

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.

None yet

3 participants