Skip to content

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

Closed
wants to merge 6 commits into from

Conversation

jaehoonhwang
Copy link
Contributor

@jaehoonhwang jaehoonhwang commented Mar 16, 2017

How can I run tests on parse_dates.py?

I am getting ValueError: no option named 'only_slow' with item.config.getoption("--only-slow"):

@jaehoonhwang jaehoonhwang changed the title TST: move pandas/tests/io/test_date_converters.py to pandas/tests/io/parsers/parse_dates.py [WIP] TST: move pandas/tests/io/test_date_converters.py to pandas/tests/io/parsers/parse_dates.py Mar 16, 2017
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

this comment not needed

@jreback
Copy link
Contributor

jreback commented Mar 17, 2017

pls remove the original file (test_date_converts.py)!

ping on green.

@jreback jreback added the Testing pandas testing functions or related to the test suite label Mar 17, 2017
@jreback jreback added this to the 0.20.0 milestone Mar 17, 2017
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
Copy link
Contributor

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):
Copy link
Contributor

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)

Copy link
Contributor

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

@jreback
Copy link
Contributor

jreback commented Mar 18, 2017

lgtm. ping on green.

@jreback jreback closed this in ee19222 Mar 18, 2017
@jreback
Copy link
Contributor

jreback commented Mar 18, 2017

thanks!

@codecov
Copy link

codecov bot commented Mar 18, 2017

Codecov Report

Merging #15707 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            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
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%)
pandas/computation/pytables.py 90.75% <0%> (-0.85%)
pandas/tools/merge.py 93.68% <0%> (-0.34%)
pandas/core/frame.py 97.87% <0%> (-0.11%)
pandas/core/base.py 95.48% <0%> (-0.03%)
pandas/core/groupby.py 94.96% <0%> (-0.03%)
pandas/core/series.py 94.89% <0%> (-0.02%)
pandas/indexes/category.py 98.28% <0%> (-0.01%)
pandas/indexes/base.py 96.14% <0%> (-0.01%)
pandas/indexes/multi.py 96.59% <0%> (-0.01%)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61f6f63...0b309d3. Read the comment docs.

@jaehoonhwang jaehoonhwang changed the title [WIP] TST: move pandas/tests/io/test_date_converters.py to pandas/tests/io/parsers/parse_dates.py TST: move pandas/tests/io/test_date_converters.py to pandas/tests/io/parsers/parse_dates.py Mar 20, 2017
AnkurDedania pushed a commit to AnkurDedania/pandas that referenced this pull request Mar 21, 2017
…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'
mattip pushed a commit to mattip/pandas that referenced this pull request Apr 3, 2017
…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'
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.

TST: move pandas/tests/io/test_date_converters.py to pandas/tests/io/parsers/parse_dates.py
2 participants