Skip to content

Commit 0a5e36a

Browse files
committed
TST: sparc fixes in datetime weirdness
1 parent 586fe06 commit 0a5e36a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pandas/tests/test_frame.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import pandas as pd
3939
from pandas.io.parsers import read_csv
4040
from pandas.parser import CParserError
41+
from pandas.util.misc import is_little_endian
4142

4243
from pandas.util.testing import (assert_almost_equal,
4344
assert_series_equal,
@@ -3961,20 +3962,19 @@ def test_from_records_with_datetimes(self):
39613962
if sys.version < LooseVersion('2.7'):
39623963
raise nose.SkipTest('rec arrays dont work properly with py2.6')
39633964

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+
39643970
# construction with a null in a recarray
39653971
# GH 6140
39663972
expected = DataFrame({ 'EXPIRY' : [datetime(2005, 3, 1, 0, 0), None ]})
39673973

39683974
arrdata = [np.array([datetime(2005, 3, 1, 0, 0), None])]
39693975
dtypes = [('EXPIRY', '<M8[ns]')]
39703976

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)
39783978
result = DataFrame.from_records(recarray)
39793979
assert_frame_equal(result,expected)
39803980

0 commit comments

Comments
 (0)