Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit 71b65ab

Browse files
committed
TST: skip test on Python 3
1 parent cc710b1 commit 71b65ab

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pandas/io/tests/test_parsers.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from pandas.io.parsers import read_csv, read_table, ExcelFile, TextParser
2222
from pandas.util.testing import assert_almost_equal, assert_frame_equal
2323
import pandas._tseries as lib
24+
from pandas.util import py3compat
2425

2526
class TestParsers(unittest.TestCase):
2627
data1 = """index,A,B,C,D
@@ -303,16 +304,18 @@ def test_sniff_delimiter(self):
303304
data3 = read_csv(StringIO(text), index_col=0, sep=None, skiprows=2)
304305
assert_frame_equal(data, data3)
305306

306-
text = u"""ignore this
307+
# can't get this to work on Python 3
308+
if not py3compat.PY3:
309+
text = u"""ignore this
307310
ignore this too
308311
index|A|B|C
309312
foo|1|2|3
310313
bar|4|5|6
311314
baz|7|8|9
312315
""".encode('utf-8')
313-
data4 = read_csv(BytesIO(text), index_col=0, sep=None, skiprows=2,
314-
encoding='utf-8')
315-
assert_frame_equal(data, data4)
316+
data4 = read_csv(BytesIO(text), index_col=0, sep=None, skiprows=2,
317+
encoding='utf-8')
318+
assert_frame_equal(data, data4)
316319

317320
def test_read_nrows(self):
318321
df = read_csv(StringIO(self.data1), nrows=3)

0 commit comments

Comments
 (0)