Skip to content

Conversation

@MattRijk
Copy link
Contributor

@MattRijk MattRijk commented Oct 5, 2016

tm.assert_numpy_array_equal(idx._nan_idxs,
np.array([1], dtype=np.int64))
# def test_nat(self):
# self.assertIs(pd.TimedeltaIndex._na_value, pd.NaT)
Copy link
Contributor

Choose a reason for hiding this comment

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

what the heck are you commenting out a test?

Copy link
Contributor

@jreback jreback Oct 5, 2016

Choose a reason for hiding this comment

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

if it's incorrect it should be deleted (but it's not)
it can be skipped on paticular platforms if needed
but this should work on 32bit

self.assertFalse(idx.hasnans)
tm.assert_numpy_array_equal(idx._nan_idxs,
np.array([], dtype=np.int64))

Copy link
Contributor

Choose a reason for hiding this comment

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

pls don't change the formatting unless it's germane (this line is too long anyhow)

self.assertIs(pd.PeriodIndex([], freq='M')._na_value, pd.NaT)

idx = pd.PeriodIndex(['2011-01-01', '2011-01-02'], freq='D')
self.assertTrue(idx._can_hold_na)
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about that forgot i commented those out when i was figuring out the error.
I installed pandas on 32bit ubuntu, ran all the nosetests and keep getting that AssertionError.
Should i change it to intp or leave it?

Copy link
Contributor

Choose a reason for hiding this comment

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

the intp is correct

@jorisvandenbossche jorisvandenbossche added the Testing pandas testing functions or related to the test suite label Oct 5, 2016
Copy link
Contributor

Choose a reason for hiding this comment

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

pls revert whitespace changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

same

Copy link
Contributor

Choose a reason for hiding this comment

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

you seem to be adding whitespace at the end of the line

Copy link
Contributor

Choose a reason for hiding this comment

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

same (and below)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm getting this error from travis ci - The command "ci/lint.sh" exited with 1. How would I figure this out?

Copy link
Member

Choose a reason for hiding this comment

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

@MattRijk If you look at the log of the failing travis build, at the bottom you will see the output of the linter:

pandas/tseries/tests/test_base.py:860:58: W291 trailing whitespace pandas/tseries/tests/test_base.py:862:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:866:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:869:55: W291 trailing whitespace pandas/tseries/tests/test_base.py:871:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:877:55: W291 trailing whitespace pandas/tseries/tests/test_base.py:1713:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:1716:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:1721:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:1724:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:2710:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:2713:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:2718:1: W293 blank line contains whitespace pandas/tseries/tests/test_base.py:2721:1: W293 blank line contains whitespace 

You can normally set your editor to automatically remove trailing white space, then you would normally have less of such issues.

@jreback jreback changed the title TST: #14345 fixes TestDatetimeIndexOps test_nat AssertionErors TST: #14345 fixes TestDatetimeIndexOps test_nat AssertionErrors on 32-bit Oct 5, 2016
@codecov-io
Copy link

codecov-io commented Oct 5, 2016

Current coverage is 85.26% (diff: 100%)

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

@@ master #14347 diff @@ ========================================== Files 140 140 Lines 50632 50632 Methods 0 0 Messages 0 0 Branches 0 0 ========================================== + Hits 43170 43171 +1  + Misses 7462 7461 -1  Partials 0 0 

Powered by Codecov. Last update 96b364a...73ad3d7

@jreback
Copy link
Contributor

jreback commented Oct 6, 2016

thanks @MattRijk lgtm.

@jreback jreback added this to the 0.19.1 milestone Oct 6, 2016
@jreback jreback closed this in 58542e8 Oct 6, 2016
tworec pushed a commit to RTBHOUSE/pandas that referenced this pull request Oct 21, 2016
…rors on 32-bit closes pandas-dev#14345 Author: mattrijk <matthewrijk@gmail.com> Closes pandas-dev#14347 from MattRijk/issue#14345 and squashes the following commits: 73ad3d7 [mattrijk] line 2710 formatting update for whitespace ea4f151 [mattrijk] second formatting update for whitespace 262492f [mattrijk] TST: pandas-dev#14345 fixes TestDatetimeIndexOps test_nat AssertionErors
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

4 participants