|
23 | 23 | from pandas._libs.tslib import iNaT
|
24 | 24 |
|
25 | 25 | from pandas.compat import lrange, range, zip, long
|
26 |
| -from pandas.util.testing import assert_series_equal |
| 26 | +from pandas.util.testing import assert_series_equal, assert_frame_equal |
27 | 27 | import pandas.util.testing as tm
|
28 | 28 |
|
29 | 29 | from .common import TestData
|
@@ -146,14 +146,15 @@ def test_constructor_list_like(self):
|
146 | 146 | ([1, 2]),
|
147 | 147 | ([1.0, 2.0, np.nan]),
|
148 | 148 | (['1', '2']),
|
149 |
| - (pd.date_range('1/1/2011', periods=2)), |
150 |
| - (pd.date_range('1/1/2011', periods=2, tz='US/Eastern')), |
151 |
| - (pd.Interval(left=0, right=5)), |
| 149 | + (list(pd.date_range('1/1/2011', periods=2, freq='H'))), |
| 150 | + (list(pd.date_range('1/1/2011', periods=2, freq='H', |
| 151 | + tz='US/Eastern'))), |
| 152 | + ([pd.Interval(left=0, right=5)]), |
152 | 153 | ])
|
153 | 154 | def test_constructor_list_str(self, input_vals):
|
154 | 155 | # GH 16605
|
155 |
| - # Ensure that data elements are converted to strings when |
156 |
| - # dtype is str, 'str', or 'U' |
| 156 | + # Ensure that data elements from a list are converted to strings |
| 157 | + # when dtype is str, 'str', or 'U' |
157 | 158 |
|
158 | 159 | for dtype in ['str', str, 'U']:
|
159 | 160 | result = Series(input_vals, dtype=dtype)
|
|
0 commit comments