Skip to content

Commit

Permalink
Really truly fix it hopefully.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed Apr 27, 2018
1 parent 7c4f625 commit eb43fa4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pandas/tests/extension/json/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ def dtype():
@pytest.fixture
def data():
"""Length-100 PeriodArray for semantics test."""
data = make_data()

# Why the while loop? NumPy is unable to construct an ndarray from
# equal-length ndarrays. Many of our operations involve coercing the
# EA to an ndarray of objects. To avoid random test failures, we ensure
# that our data is coercable to an ndarray. Several tests deal with only
# the first two elements, so that's what we'll check.

while len(data[0]) == len(data[1]):
data = make_data()

return JSONArray(make_data())


Expand Down

0 comments on commit eb43fa4

Please sign in to comment.