Skip to content

TST: implement test_first #32274

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

Merged
merged 3 commits into from
Feb 27, 2020
Merged

Conversation

jbrockmendel
Copy link
Member

cc @MomIsBestFriend there are three things about these tests that I think would make for good (separate) follow-ups if you're interested:

  1. They are just begging to be parametrized
  2. We don't have a systematic way of naming/organizing tests that are for two specific methods rather than one specific method, which is the idea behind tests.(frame|series).methods. (see also: head/tail, first_valid_index/last_valid_index)
  3. These tests could/should also be shared/parametrized over Series vs DataFrame, but we dont have a systematic home or naming convention for these.

@ShaharNaveh
Copy link
Member

@jbrockmendel I would love to open a PR parameterising these tests.

Choosing a naming convention seems too difficult for me, tbh

@@ -0,0 +1,61 @@
"""
Note: includes tests for `last`
Copy link
Member

Choose a reason for hiding this comment

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

Could we just rename the file test_first_and_last.py?

@@ -0,0 +1,69 @@
"""
Copy link
Member

Choose a reason for hiding this comment

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

Could we just rename the file test_first_and_last.py?

@simonjayhawkins simonjayhawkins added Clean Testing pandas testing functions or related to the test suite labels Feb 27, 2020
@simonjayhawkins simonjayhawkins added this to the 1.1 milestone Feb 27, 2020
@simonjayhawkins simonjayhawkins merged commit 0233a55 into pandas-dev:master Feb 27, 2020
@jbrockmendel jbrockmendel deleted the test-first branch February 27, 2020 16:21
@simonjayhawkins
Copy link
Member

Thanks @jbrockmendel I think naming the module test_first as you originally did is more consistent. Maybe we could have a test_last.py file which is just a comment that directs the contributor/reader to test_first.py

roberthdevries pushed a commit to roberthdevries/pandas that referenced this pull request Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants