Skip to content

Commit b041b7c

Browse files
committed
TST: use compat.long in test_tslib for py3
1 parent 2bab718 commit b041b7c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pandas/tseries/tests/test_timedeltas.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import pandas.util.testing as tm
2424
from numpy.random import rand, randn
2525
from pandas import _np_version_under1p8
26+
import pandas.compat as compat
27+
2628

2729
iNaT = tslib.iNaT
2830

@@ -311,7 +313,7 @@ def test_fields(self):
311313

312314
def check(value):
313315
# that we are int/long like
314-
self.assertTrue(isinstance(value, (int, long)))
316+
self.assertTrue(isinstance(value, (int, compat.long)))
315317

316318
# compat to datetime.timedelta
317319
rng = to_timedelta('1 days, 10:11:12')

pandas/tseries/tests/test_tslib.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
import pandas.tseries.offsets as offsets
1515
import pandas.util.testing as tm
1616
from pandas.util.testing import assert_series_equal
17+
import pandas.compat as compat
18+
1719

1820
class TestTimestamp(tm.TestCase):
1921

@@ -373,7 +375,7 @@ def test_fields(self):
373375

374376
def check(value, equal):
375377
# that we are int/long like
376-
self.assertTrue(isinstance(value, (int, long)))
378+
self.assertTrue(isinstance(value, (int, compat.long)))
377379
self.assertEqual(value, equal)
378380

379381
# GH 10050

0 commit comments

Comments
 (0)