|
38 | 38 | import pandas as pd
|
39 | 39 | from pandas.io.parsers import read_csv
|
40 | 40 | from pandas.parser import CParserError
|
| 41 | +from pandas.util.misc import is_little_endian |
41 | 42 |
|
42 | 43 | from pandas.util.testing import (assert_almost_equal,
|
43 | 44 | assert_series_equal,
|
@@ -3961,20 +3962,19 @@ def test_from_records_with_datetimes(self):
|
3961 | 3962 | if sys.version < LooseVersion('2.7'):
|
3962 | 3963 | raise nose.SkipTest('rec arrays dont work properly with py2.6')
|
3963 | 3964 |
|
| 3965 | + # this may fail on certain platforms because of a numpy issue |
| 3966 | + # related GH6140 |
| 3967 | + if not is_little_endian(): |
| 3968 | + raise nose.SkipTest("known failure of test on non-little endian") |
| 3969 | + |
3964 | 3970 | # construction with a null in a recarray
|
3965 | 3971 | # GH 6140
|
3966 | 3972 | expected = DataFrame({ 'EXPIRY' : [datetime(2005, 3, 1, 0, 0), None ]})
|
3967 | 3973 |
|
3968 | 3974 | arrdata = [np.array([datetime(2005, 3, 1, 0, 0), None])]
|
3969 | 3975 | dtypes = [('EXPIRY', '<M8[ns]')]
|
3970 | 3976 |
|
3971 |
| - # this may fail on certain platforms because of a numpy issue |
3972 |
| - # related GH6140 |
3973 |
| - try: |
3974 |
| - recarray = np.core.records.fromarrays(arrdata, dtype=dtypes) |
3975 |
| - except (ValueError): |
3976 |
| - raise nose.SkipTest('rec arrays with datetimes not supported') |
3977 |
| - |
| 3977 | + recarray = np.core.records.fromarrays(arrdata, dtype=dtypes) |
3978 | 3978 | result = DataFrame.from_records(recarray)
|
3979 | 3979 | assert_frame_equal(result,expected)
|
3980 | 3980 |
|
|
0 commit comments