Skip to content

TST: Check ndarray dtype by default #13088

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

Closed
wants to merge 1 commit into from

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented May 5, 2016

Also did little cleanup of testing.pyx and testing.py.

@sinhrks sinhrks added Testing pandas testing functions or related to the test suite Dtype Conversions Unexpected or buggy dtype conversions Clean labels May 5, 2016
@sinhrks sinhrks added this to the 0.18.2 milestone May 5, 2016
@codecov-io
Copy link

codecov-io commented May 5, 2016

Current coverage is 84.14%

Merging #13088 into master will increase coverage by +<.01%

@@             master     #13088   diff @@
==========================================
  Files           137        137          
  Lines         50261      50238    -23   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          42288      42270    -18   
+ Misses         7973       7968     -5   
  Partials          0          0          
  1. 2 files (not in diff) in pandas/tseries were modified. more
    • Misses -4
    • Hits -22
  2. 2 files (not in diff) in pandas/io were modified. more
    • Misses -3
    • Hits -3
  3. File ...ndas/util/testing.py was modified. more
    • Misses 0
    • Partials 0
    • Hits -2

Powered by Codecov. Last updated by 1296ab3...a210f79

@jreback
Copy link
Contributor

jreback commented May 5, 2016

@sinhrks sinhrks force-pushed the test_array_dtype branch from a210f79 to b9e5946 Compare May 5, 2016 12:26
np.array(["a", "b", "c"]))

exp_cat = np.array(["a", "b", "c", "a"], dtype=np.object_)
self.assert_numpy_array_equal(cat.__array__(), exp_cat)
Copy link
Contributor

Choose a reason for hiding this comment

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

can do in a followup, but I suspect some of these tests would be more clear to construct the expected Categorical and use assert_equal_categorical (when these were originally written we didn't hav e it).

@sinhrks sinhrks mentioned this pull request May 5, 2016
2 tasks
@sinhrks sinhrks force-pushed the test_array_dtype branch from b9e5946 to 5431b29 Compare May 5, 2016 23:24
na, nb = a.size, b.size
if a.shape != b.shape:
from pandas.util.testing import raise_assert_detail
raise_assert_detail(obj, '{0} shapes are different'.format(obj),
a.shape, b.shape)

if check_dtype and a.dtype != b.dtype:
Copy link
Contributor

Choose a reason for hiding this comment

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

use not com.is_dtype_equal

@sinhrks sinhrks force-pushed the test_array_dtype branch 2 times, most recently from 08950d0 to 714a1ad Compare May 6, 2016 17:37
@sinhrks sinhrks force-pushed the test_array_dtype branch from 714a1ad to f2ae8e2 Compare May 6, 2016 22:55
@jreback jreback closed this in c76ca44 May 7, 2016
@jreback
Copy link
Contributor

jreback commented May 7, 2016

thanks @sinhrks

@sinhrks sinhrks deleted the test_array_dtype branch May 7, 2016 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean 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