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

Separate non-scalar tests from test_timestamps #19385

Merged
merged 1 commit into from
Jan 25, 2018

Conversation

jbrockmendel
Copy link
Member

Getting DataFrame, Series, Index tests out of tests.scalars and organizing them better, should make it easier to go and parametrize some older tests, in particular arithmetic and comparisons.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

looks fine. I would like to generally create sub modules rather than move things inside a single file.

ser[0] = pd.Timestamp('nat')
ser[3] = pd.Timestamp('nat')

ops = {'lt': 'gt', 'le': 'ge', 'eq': 'eq', 'ne': 'ne'}
Copy link
Contributor

Choose a reason for hiding this comment

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

note to parametrize

check(ts.week, 1)
check(ts.daysinmonth, 31)

ts = Timestamp('2014-01-01 00:00:00+01:00')
Copy link
Contributor

Choose a reason for hiding this comment

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

note to separate & parametrize (the is_* ones)

# GH 17354
assert data.weekday_name == expected

@pytest.mark.parametrize('tz', [None, 'UTC', 'US/Eastern', 'Asia/Tokyo'])
Copy link
Contributor

Choose a reason for hiding this comment

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

note to use the tz fixture

@jreback jreback added the Testing pandas testing functions or related to the test suite label Jan 25, 2018
@jreback jreback added this to the 0.23.0 milestone Jan 25, 2018
@jreback jreback added the Datetime Datetime data dtype label Jan 25, 2018
@jbrockmendel
Copy link
Member Author

note to parametrize

Noted.

@codecov
Copy link

codecov bot commented Jan 25, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19385      +/-   ##
==========================================
+ Coverage   91.57%   91.64%   +0.06%     
==========================================
  Files         150      150              
  Lines       48684    48699      +15     
==========================================
+ Hits        44583    44630      +47     
+ Misses       4101     4069      -32
Flag Coverage Δ
#multiple 90.01% <ø> (+0.06%) ⬆️
#single 41.72% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/indexes/interval.py 92.4% <0%> (-0.02%) ⬇️
pandas/core/categorical.py 100% <0%> (ø) ⬆️
pandas/core/reshape/tile.py 90.25% <0%> (ø) ⬆️
pandas/core/dtypes/generic.py 100% <0%> (ø) ⬆️
pandas/core/indexes/base.py 96.46% <0%> (ø) ⬆️
pandas/plotting/_converter.py 66.95% <0%> (+1.73%) ⬆️
pandas/io/parquet.py 71.55% <0%> (+19.26%) ⬆️

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 b4662cd...a6abdc2. Read the comment docs.

@jreback jreback merged commit d3f7d2a into pandas-dev:master Jan 25, 2018
@jreback
Copy link
Contributor

jreback commented Jan 25, 2018

thanks. a PR to separate into submodules (comparisons, arithmetic, and ops) would be very helpful (hint to do next).

@jbrockmendel jbrockmendel deleted the ts_tests branch January 31, 2018 06:49
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.

None yet

2 participants