Skip to content
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

move array_to_datetime timests #19640

Merged
merged 7 commits into from
Feb 12, 2018
Merged

Conversation

jbrockmendel
Copy link
Member

Almost done.

With array_to_datetime there is some fuzziness in when a test is for array_to_datetime and when it is for to_datetime. I'm trying to specifically isolate tslibs tests, so for now am erring on the side of keeping to_datetime tests in test_tools.

# test only the iso parser - flexibility to different
# separators and leadings 0s
# Timestamp construction falls back to dateutil
cases = {'2011-01-02': datetime(2011, 1, 2),
Copy link
Contributor

Choose a reason for hiding this comment

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

can u parametrize

with pytest.raises(ValueError):
tslib._test_parse_iso8601(date_str)
# If no ValueError raised, let me know which case failed.
raise Exception(date_str)
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not necessary and the point off parametering

Copy link
Contributor

Choose a reason for hiding this comment

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

can you remove this except

@jreback jreback added Testing pandas testing functions or related to the test suite Datetime Datetime data dtype labels Feb 10, 2018
@codecov
Copy link

codecov bot commented Feb 11, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19640      +/-   ##
==========================================
+ Coverage   91.58%   91.61%   +0.02%     
==========================================
  Files         150      150              
  Lines       48807    48807              
==========================================
+ Hits        44702    44714      +12     
+ Misses       4105     4093      -12
Flag Coverage Δ
#multiple 89.98% <ø> (+0.02%) ⬆️
#single 41.73% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/plotting/_converter.py 66.95% <0%> (+1.73%) ⬆️

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 7a5634e...2e6ac8c. Read the comment docs.

with pytest.raises(ValueError):
tslib._test_parse_iso8601(date_str)
# If no ValueError raised, let me know which case failed.
raise Exception(date_str)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you remove this except

result = tslib.array_to_datetime(arr, errors='ignore')
tm.assert_numpy_array_equal(result, arr)

@pytest.mark.parametrize('invalid_date', [date(1000, 1, 1),
Copy link
Contributor

Choose a reason for hiding this comment

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

pls format this

@jreback jreback added this to the 0.23.0 milestone Feb 12, 2018
@jreback jreback merged commit a277108 into pandas-dev:master Feb 12, 2018
@jreback
Copy link
Contributor

jreback commented Feb 12, 2018

formatting by wrapping near the end of the line is rarely desired.

harisbal pushed a commit to harisbal/pandas that referenced this pull request Feb 28, 2018
@jbrockmendel jbrockmendel deleted the itests6 branch June 22, 2018 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants