Skip to content

Commit 117e9f4

Browse files
committed
TST: rec arrays don't support datetimes in creation on certain platforms, related (GH6140)
1 parent f59b6a1 commit 117e9f4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pandas/tests/test_frame.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -3967,7 +3967,14 @@ def test_from_records_with_datetimes(self):
39673967

39683968
arrdata = [np.array([datetime(2005, 3, 1, 0, 0), None])]
39693969
dtypes = [('EXPIRY', '<M8[ns]')]
3970-
recarray = np.core.records.fromarrays(arrdata, dtype=dtypes)
3970+
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+
39713978
result = DataFrame.from_records(recarray)
39723979
assert_frame_equal(result,expected)
39733980

0 commit comments

Comments
 (0)