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

MAINT: Clean up pandas/util/testing.py #16271

Merged
merged 1 commit into from
May 7, 2017

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented May 6, 2017

Transform testing methods to use more pytest idiom.

xref #15990.

@@ -571,8 +571,7 @@ def test_groupby_with_timezone_selection(self):
def test_timezone_info(self):
# GH 11682
# Timezone info lost when broadcasting scalar datetime to DataFrame
tm._skip_if_no_pytz()
import pytz
pytz = pytest.importorskip("pytz")
Copy link
Contributor

Choose a reason for hiding this comment

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

actually we should remove this entirely
we require pytz (prob lots of skips related to pytz in the codebase - should remove all of them)

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, so just assume we have pytz installed?

Copy link
Contributor

Choose a reason for hiding this comment

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

see if anything breaks when these are installed

@@ -376,7 +376,7 @@ def test_constructor_datetime64_tzformat(self):
tz='Asia/Tokyo')
tm.assert_numpy_array_equal(idx.asi8, expected_i8.asi8)

tm._skip_if_no_dateutil()
pytest.importorskip("dateutil")
Copy link
Contributor

Choose a reason for hiding this comment

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

these are also required so again can remove

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, so just assume we have dateutil installed?

Copy link
Contributor

Choose a reason for hiding this comment

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

see if anything breaks when these are installed

@jreback jreback added the Testing pandas testing functions or related to the test suite label May 6, 2017
@jreback jreback added this to the 0.21.0 milestone May 6, 2017
@codecov
Copy link

codecov bot commented May 6, 2017

Codecov Report

Merging #16271 into master will increase coverage by 0.02%.
The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16271      +/-   ##
==========================================
+ Coverage   90.32%   90.34%   +0.02%     
==========================================
  Files         167      167              
  Lines       50908    50872      -36     
==========================================
- Hits        45981    45961      -20     
+ Misses       4927     4911      -16
Flag Coverage Δ
#multiple 88.13% <41.66%> (+0.04%) ⬆️
#single 40.31% <8.33%> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/util/testing.py 80.39% <41.66%> (+1.7%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.59% <0%> (-0.1%) ⬇️

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 8809b04...2c987d2. Read the comment docs.

@codecov
Copy link

codecov bot commented May 6, 2017

Codecov Report

Merging #16271 into master will increase coverage by 0.02%.
The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16271      +/-   ##
==========================================
+ Coverage   90.34%   90.36%   +0.02%     
==========================================
  Files         167      167              
  Lines       50908    50872      -36     
==========================================
- Hits        45994    45973      -21     
+ Misses       4914     4899      -15
Flag Coverage Δ
#multiple 88.15% <41.66%> (+0.03%) ⬆️
#single 40.31% <8.33%> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/util/testing.py 80.39% <41.66%> (+1.51%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.59% <0%> (-0.1%) ⬇️
pandas/core/common.py 91.03% <0%> (+0.34%) ⬆️

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 ea56550...f4a1468. Read the comment docs.

Transform testing methods to use more
pytest idiom.

Also, assume that dateutil and pytz
are installed for testing because
there are core dependencies for pandas.
@gfyoung
Copy link
Member Author

gfyoung commented May 7, 2017

@jreback : Not sure what codecov is complaining about. However, I made all of the requested changes, and everything else is green.

@jreback
Copy link
Contributor

jreback commented May 7, 2017

@gfyoung yeah I am about ready to disable codecov. It is pretty bogus. I haven't been able to make it use the latest master as the comparison (not really sure why) and their help services are not very helpful :<

if you want to have a look at other code coverage services we could easily switch.

@jreback jreback merged commit d50f981 into pandas-dev:master May 7, 2017
@jreback
Copy link
Contributor

jreback commented May 7, 2017

thanks!

@gfyoung gfyoung deleted the util-testing-clean-up branch May 7, 2017 21:41
pawroman pushed a commit to pawroman/pandas that referenced this pull request May 9, 2017
Transform testing methods to use more
pytest idiom.

Also, assume that dateutil and pytz
are installed for testing because
there are core dependencies for pandas.
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
Transform testing methods to use more
pytest idiom.

Also, assume that dateutil and pytz
are installed for testing because
there are core dependencies for pandas.
stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
Transform testing methods to use more
pytest idiom.

Also, assume that dateutil and pytz
are installed for testing because
there are core dependencies for pandas.
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.

2 participants