Skip to content

REF/TST: mixed use of mock/monkeypatch #24557

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

Merged
merged 3 commits into from
Jan 5, 2019
Merged

Conversation

simonjayhawkins
Copy link
Member

doubt if this will work as don't have gbq configured locally.

will need to check output of CI.

@WillAyd WillAyd added Testing pandas testing functions or related to the test suite Clean labels Jan 2, 2019
@WillAyd
Copy link
Member

WillAyd commented Jan 2, 2019

Is the goal here to get rid of the import? We are dropping Py27 for 0.25 onwards so may be able to remove organically.

I suppose by using a lambda we are making more assumptions about the pandas_gbq codebase and how they treat their functions. May or may not make a difference but I'd lean towards just waiting to drop Py27 as part of cleanup

@simonjayhawkins
Copy link
Member Author

@WillAyd we could drop the import in this module by using the mock fixture from conftest.py.

this was to see if we need mock at all and could just use monkeypatch instead of both mock and monkeypatch.

i expect this PR to fail on the parameters, i'll either change the number of inputs or change the lambda to a function with *args and **kwargs.

@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

Merging #24557 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24557   +/-   ##
=======================================
  Coverage   92.33%   92.33%           
=======================================
  Files         166      166           
  Lines       52465    52465           
=======================================
  Hits        48442    48442           
  Misses       4023     4023
Flag Coverage Δ
#multiple 90.75% <ø> (ø) ⬆️
#single 43% <ø> (ø) ⬆️

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 aa7cb01...ab496f8. Read the comment docs.

@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

Merging #24557 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24557   +/-   ##
=======================================
  Coverage   92.37%   92.37%           
=======================================
  Files         166      166           
  Lines       52396    52396           
=======================================
  Hits        48403    48403           
  Misses       3993     3993
Flag Coverage Δ
#multiple 90.8% <ø> (ø) ⬆️
#single 43% <ø> (ø) ⬆️

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 19f715c...72a6c0b. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Jan 3, 2019

we also have a mock fixture in pandas/conftest.py should remove that too

@WillAyd
Copy link
Member

WillAyd commented Jan 4, 2019

lgtm @jreback

@jreback jreback added this to the 0.24.0 milestone Jan 5, 2019
@jreback jreback merged commit 0dd02f1 into pandas-dev:master Jan 5, 2019
@jreback
Copy link
Contributor

jreback commented Jan 5, 2019

thanks!

@simonjayhawkins simonjayhawkins deleted the gbq branch January 5, 2019 21:03
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants