-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: move pandas/tests/io/test_date_converters.py to pandas/tests/io/parsers/parse_dates.py #15707
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
Moving setUp from tests_dates_generator.py to function scope variable.
@@ -510,3 +512,148 @@ def test_parse_date_time_multi_level_column_name(self): | |||
expected = DataFrame(expected_data, | |||
columns=['date_time', ('A', 'a'), ('B', 'b')]) | |||
tm.assert_frame_equal(result, expected) | |||
|
|||
def test_parse_date_time(self): | |||
# From test_date_coverter |
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 comment not needed
pls remove the original file (test_date_converts.py)! ping on green. |
Import date, Multiindex and fixed self.readcsv added
from pandas import compat | ||
from pandas.compat import parse_date, StringIO, lrange | ||
from pandas.compat.numpy import np_array_datetime64_compat | ||
from pandas.io.parsers import read_table |
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.
don't use read_table
instead these should use self.read_csv
@@ -510,3 +513,148 @@ def test_parse_date_time_multi_level_column_name(self): | |||
expected = DataFrame(expected_data, | |||
columns=['date_time', ('A', 'a'), ('B', 'b')]) | |||
tm.assert_frame_equal(result, expected) | |||
|
|||
def test_parse_date_time(self): |
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.
things that are strictly related the the actual parsing (e.g. just involve conv) can be put in a separate class; name it TestConverters (otherwise it won't be run)
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.
actually nvm about this comment
lgtm. ping on green. |
thanks! |
Codecov Report
@@ Coverage Diff @@
## master #15707 +/- ##
==========================================
- Coverage 91.03% 91% -0.03%
==========================================
Files 143 143
Lines 49411 49396 -15
==========================================
- Hits 44979 44951 -28
- Misses 4432 4445 +13
Continue to review full report at Codecov.
|
…parsers/parse_dates.py closes pandas-dev#15519 Author: Jaehoon Hwang <[email protected]> Closes pandas-dev#15707 from jaehoonhwang/TST15519 and squashes the following commits: 0b309d3 [Jaehoon Hwang] Fixed frame email and PEP8 ef6e8fa [Jaehoon Hwang] Fixing up few lines and imports e019e95 [Jaehoon Hwang] Imported read_table and using self.readcsv 3eb63c5 [Jaehoon Hwang] TST15519 Moving Unit tests to appropriate file 9b20caa [Jaehoon Hwang] Merge remote-tracking branch 'pandas-dev/master' b977615 [Jaehoon Hwang] Merge remote-tracking branch 'pandas-dev/master'
…parsers/parse_dates.py closes pandas-dev#15519 Author: Jaehoon Hwang <[email protected]> Closes pandas-dev#15707 from jaehoonhwang/TST15519 and squashes the following commits: 0b309d3 [Jaehoon Hwang] Fixed frame email and PEP8 ef6e8fa [Jaehoon Hwang] Fixing up few lines and imports e019e95 [Jaehoon Hwang] Imported read_table and using self.readcsv 3eb63c5 [Jaehoon Hwang] TST15519 Moving Unit tests to appropriate file 9b20caa [Jaehoon Hwang] Merge remote-tracking branch 'pandas-dev/master' b977615 [Jaehoon Hwang] Merge remote-tracking branch 'pandas-dev/master'
git diff upstream/master | flake8 --diff
How can I run tests on
parse_dates.py
?I am getting
ValueError: no option named 'only_slow'
withitem.config.getoption("--only-slow"):