Skip to content

Conversation

@jbrockmendel
Copy link
Member

No description provided.

@WillAyd
Copy link
Member

WillAyd commented Feb 27, 2020

Maybe missed on a previous PR but is the plan to do a separate module for every method? I don’t think its current location is necessarily problematic so just curious of the motivation for this

@WillAyd WillAyd added the Testing pandas testing functions or related to the test suite label Feb 27, 2020
@jbrockmendel
Copy link
Member Author

but is the plan to do a separate module for every method?

Not quite. Some criteria that make a method a candidate for this treatment:

  • is X a top-level method that isnt relied on by any/many other methods?
  • is it easy to grep to determine that we have collected all tests for X?
    • e.g. first_valid_index
  • is it not-obvious where tests for X would go?
    • e.g. DataFrame.insert tests could go in a number of places based on filenames in tests/frame/
  • does X not fit into one of the better-defined buckets of arithmetic/indexing/reductions/cumulative?
  • are the tests for X candidates to be shared between Series/DataFrame
  • is X a method that exists on multiple classes where we can't necessary share tests, but it is helpful to have a parallel test structure
    • e.g. searchsorted

Hope this helps.

@jreback jreback added this to the 1.1 milestone Feb 27, 2020
@jreback jreback merged commit eb6f8d3 into pandas-dev:master Feb 27, 2020
@jreback
Copy link
Contributor

jreback commented Feb 27, 2020

thanks @jbrockmendel

@WillAyd as a general rule having more fine-grained test files is a goal.

@jbrockmendel jbrockmendel deleted the tst-methods-15 branch February 27, 2020 14:55
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

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