Skip to content

Commit dcd9df7

Browse files
committed
BUG: fix unit test on linux where too many slashes in file://. close #2564
1 parent 2e05e5c commit dcd9df7

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

RELEASE.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ pandas 0.10.1
6161
- handle correctly ``Term`` passed types (e.g. ``index<1000``, when index
6262
is ``Int64``), (closes GH512_)
6363
- Fix DataFrame.info bug with UTF8-encoded columns. (GH2576_)
64+
- Fix DatetimeIndex handling of FixedOffset tz (GH2604_)
65+
- More robust detection of being in IPython session for wide DataFrame
66+
console formatting (GH2585_)
67+
- Fix platform issues with ``file:///`` in unit test (#2564)
6468

6569
**API Changes**
6670

@@ -72,6 +76,8 @@ pandas 0.10.1
7276
.. _GH1277: https://github.com/pydata/pandas/issues/1277
7377
.. _GH2327: https://github.com/pydata/pandas/issues/2327
7478
.. _GH2576: https://github.com/pydata/pandas/issues/2576
79+
.. _GH2585: https://github.com/pydata/pandas/issues/2585
80+
.. _GH2604: https://github.com/pydata/pandas/issues/2604
7581

7682
pandas 0.10.0
7783
=============

pandas/io/tests/test_parsers.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,13 @@ def test_empty_string(self):
102102

103103
def test_read_csv(self):
104104
if not py3compat.PY3:
105-
fname=u"file:///"+unicode(self.csv1)
106-
try:
107-
df1 = read_csv(fname, index_col=0, parse_dates=True)
108-
except IOError:
109-
assert(False), "read_csv should accept unicode objects as urls"
105+
if 'win' in sys.platform:
106+
prefix = u"file:///"
107+
else:
108+
prefix = u"file://"
109+
fname = prefix + unicode(self.csv1)
110+
# it works!
111+
df1 = read_csv(fname, index_col=0, parse_dates=True)
110112

111113
def test_dialect(self):
112114
data = """\

pandas/tools/tests/test_merge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,8 +1510,8 @@ def test_concat_series_axis1(self):
15101510
self.assertTrue(np.array_equal(result.columns, range(2)))
15111511

15121512
# must reindex, #2603
1513-
s = Series(randn(5), name='A')
1514-
s2 = Series(randn(6), name='B')
1513+
s = Series(randn(3), index=['c', 'a', 'b'], name='A')
1514+
s2 = Series(randn(4), index=['d', 'a', 'b', 'c'], name='B')
15151515
result = concat([s, s2], axis=1)
15161516
expected = DataFrame({'A': s, 'B': s2})
15171517
assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)