-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Timedelta tests reorg (gh14854) #15324
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
@@ -0,0 +1,201 @@ | |||
from datetime import time, timedelta | |||
import numpy as np | |||
|
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.
-> test_tools.py
@@ -6,27 +6,25 @@ | |||
|
|||
""" | |||
|
|||
import numpy as np | |||
from numpy.random import randn |
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.
you can move this to pandas/tests/scalar/test_period.py
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.
This is a really big file (5k+ lines)
Still move it there?
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.
sure can do in anthoher PR. I though you moved the PeriodIndex tests out already. But yes, certainly should split it.
@TrigonaMinima looks great! just a couple of corrections. |
pls add a whatsnew note as well (reorg of timeseries tests), you can put in other API changes section (in 0.20.0) |
only thing left after this are the timeseries_legacy.py tests I think (but let's deal with them in a separate PR). |
I haven't finished the reorg of |
@TrigonaMinima no, let's leave period for another. |
from datetime import timedelta | ||
|
||
import pandas as pd | ||
from pandas.util import testing as tm |
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.
so you moved this (just fine).
@@ -1,467 +0,0 @@ | |||
# -*- coding: utf-8 -*- | |||
|
|||
import numpy as np |
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.
and removed all of this (again just fine). that's why I thought you were moving Period. But can certainly finish in another.
@jreback I tried by best, but there were still some confusions. So, could you please have somewhat deeper look at it. I'll correct the issues if there are any, tomorrow night. |
what confusions? |
|
Also, I want to understand the code of the core pandas library. Any suggestions on what should the starting point be? |
ok i will have a look and see if anything needs moving so best way to understand code is to: debug or write a test, then step thru and see what it does starting with a Series or DataFrame method is useful to see |
@TrigonaMinima some flake errors. I'll have a look at your points above when merging. |
Codecov Report@@ Coverage Diff @@
## master #15324 +/- ##
==========================================
+ Coverage 86.32% 86.33% +<.01%
==========================================
Files 141 141
Lines 51164 51164
==========================================
+ Hits 44169 44170 +1
+ Misses 6995 6994 -1
Continue to review full report at Codecov.
|
@@ -1260,3 +1263,61 @@ def test_replace_series_timedelta64(self): | |||
|
|||
def test_replace_series_period(self): | |||
pass | |||
|
|||
|
|||
class TestArrayToDatetime(tm.TestCase): |
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.
these go in: pandas/tests/datetimes/tests/test_tools.py
@jreback don't know what to do with this build/merge error. I have fixed the merge conflicts. I am able to merge this branch to master without any conflicts on my local repo. |
ok np i'll fix this up |
is the compare, with a couple of changes from on top. @TrigonaMinima really appreciate the PRs here! segregated tests that are not in huge files are awesome! |
@TrigonaMinima thanks again for this! love for you to keep going (period tests!) keep in mind we are switching to |
git diff upstream/master | flake8 --diff