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

TST: fix fixture for numpy dtypes #23983

Merged
merged 6 commits into from
Nov 29, 2018
Merged

Conversation

h-vetinari
Copy link
Contributor

This was one of the things I stumbled over while working on #23982. There's a fixture for all_numpy_dtypes that got introduced in #21899, but it's a lie - it doesn't cover (nearly) all numpy dtypes. It's currently only used in one test, and so I've adapted it here to be able to actually test all numpy dtypes.

@pep8speaks
Copy link

pep8speaks commented Nov 28, 2018

Hello @h-vetinari! Thanks for updating the PR.

Comment last updated on November 29, 2018 at 06:43 Hours UTC

def test_drop_duplicates(any_numpy_dtype, keep, expected):
tc = Series([1, 0, 3, 5, 3, 0, 4], dtype=np.dtype(any_numpy_dtype))

if tc.dtype == 'bool':
Copy link
Contributor

Choose a reason for hiding this comment

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

i would just skip if bool here

@jreback jreback added Testing pandas testing functions or related to the test suite Dtype Conversions Unexpected or buggy dtype conversions labels Nov 28, 2018
@@ -386,8 +386,16 @@ def tz_aware_fixture(request):
COMPLEX_DTYPES = [complex, "complex64", "complex128"]
STRING_DTYPES = [str, 'str', 'U']

DATETIMEDELTA_DTYPES = ['datetime64[ns]', 'M8[ns]',
Copy link
Contributor

Choose a reason for hiding this comment

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

separate these out, these should not be grouped together

@codecov
Copy link

codecov bot commented Nov 29, 2018

Codecov Report

Merging #23983 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23983      +/-   ##
==========================================
- Coverage   92.31%    92.3%   -0.01%     
==========================================
  Files         161      161              
  Lines       51513    51551      +38     
==========================================
+ Hits        47554    47585      +31     
- Misses       3959     3966       +7
Flag Coverage Δ
#multiple 90.7% <ø> (-0.01%) ⬇️
#single 42.44% <ø> (+0.01%) ⬆️
Impacted Files Coverage Δ
pandas/core/arrays/timedeltas.py 95.95% <0%> (-0.31%) ⬇️
pandas/core/indexes/base.py 96.32% <0%> (-0.17%) ⬇️
pandas/core/config.py 87.04% <0%> (-0.13%) ⬇️
pandas/io/sas/sas_xport.py 90.14% <0%> (-0.1%) ⬇️
pandas/io/formats/printing.py 93.01% <0%> (-0.08%) ⬇️
pandas/plotting/_core.py 83.58% <0%> (-0.05%) ⬇️
pandas/core/computation/align.py 97.84% <0%> (-0.05%) ⬇️
pandas/core/reshape/melt.py 97.5% <0%> (-0.05%) ⬇️
pandas/core/dtypes/concat.py 96.63% <0%> (-0.04%) ⬇️
pandas/io/formats/style.py 96.69% <0%> (-0.03%) ⬇️
... and 11 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 982c169...62e8f8a. Read the comment docs.

@jreback jreback added this to the 0.24.0 milestone Nov 29, 2018
@jreback
Copy link
Contributor

jreback commented Nov 29, 2018

lgtm. ping on green.

@h-vetinari
Copy link
Contributor Author

@jreback
ping on green

@jreback jreback merged commit 5a91c53 into pandas-dev:master Nov 29, 2018
@jreback
Copy link
Contributor

jreback commented Nov 29, 2018

thanks

@h-vetinari h-vetinari deleted the all_numpy_types branch November 29, 2018 22:33
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
Dtype Conversions Unexpected or buggy dtype conversions 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