Skip to content

TST: use compat.long in test_tslib for py3 #10152

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 1 commit into from
May 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pandas/tseries/tests/test_timedeltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import pandas.util.testing as tm
from numpy.random import rand, randn
from pandas import _np_version_under1p8
import pandas.compat as compat


iNaT = tslib.iNaT

Expand Down Expand Up @@ -311,7 +313,7 @@ def test_fields(self):

def check(value):
# that we are int/long like
self.assertTrue(isinstance(value, (int, long)))
self.assertTrue(isinstance(value, (int, compat.long)))

# compat to datetime.timedelta
rng = to_timedelta('1 days, 10:11:12')
Expand Down
4 changes: 3 additions & 1 deletion pandas/tseries/tests/test_tslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import pandas.tseries.offsets as offsets
import pandas.util.testing as tm
from pandas.util.testing import assert_series_equal
import pandas.compat as compat


class TestTimestamp(tm.TestCase):

Expand Down Expand Up @@ -373,7 +375,7 @@ def test_fields(self):

def check(value, equal):
# that we are int/long like
self.assertTrue(isinstance(value, (int, long)))
self.assertTrue(isinstance(value, (int, compat.long)))
self.assertEqual(value, equal)

# GH 10050
Expand Down