Skip to content

Commit ee83d74

Browse files
committed
TST: py3 compat on test_pickle.py
1 parent cddde22 commit ee83d74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/io/tests/test_pickle.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import pandas as pd
1515
from pandas import Index
1616
from pandas.sparse.tests import test_sparse
17+
from pandas.util import py3compat
1718

1819
class TestPickle(unittest.TestCase):
1920
_multiprocess_can_split_ = True
@@ -34,6 +35,8 @@ def compare(self, vf):
3435
# we are trying to read a py3 pickle in py2.....
3536
return
3637
except:
38+
if not py3compat.PY3:
39+
raise
3740
with open(vf,'rb') as fh:
3841
data = pickle.load(fh, encoding='latin1')
3942

0 commit comments

Comments
 (0)