Skip to content

Commit

Permalink
PY2 div compat
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed May 22, 2018
1 parent 0758f1d commit b609e07
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pandas/tests/extension/integer/test_integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pytest

from pandas.tests.extension import base
from pandas.compat import PY2

from pandas.core.arrays import (
to_integer_array,
Expand Down Expand Up @@ -143,8 +144,8 @@ def compare(self, s, op, other):
rs = pd.Series(s.values.data)
expected = getattr(rs, op)(other)

# truediv can make infs
if 'truediv' in op:
# truediv/div can make infs
if 'truediv' in op or (PY2 and 'div' in op):
fill_value = np.nan
else:
fill_value = 0
Expand Down

0 comments on commit b609e07

Please sign in to comment.