Skip to content

Commit c385c99

Browse files
committed
make conftest._cython_table deterministic for Python<3.6
1 parent 5d661c8 commit c385c99

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pandas/conftest.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,11 @@ def all_arithmetic_operators(request):
123123
return request.param
124124

125125

126-
# use sorted as dicts in py<3.6 have random order, which xdist doesn't like
127-
_cython_table = sorted(((key, value) for key, value in
128-
pd.core.base.SelectionMixin._cython_table.items()),
129-
key=lambda x: x[0].__name__)
126+
# manual sorting as dicts in py<3.6 have random order, which xdist doesn't like
127+
_cython_table = [(key, pd.core.base.SelectionMixin._cython_table[key]) for key
128+
in [sum, max, min,
129+
np.all, np.any, np.sum, np.mean, np.prod, np.std, np.var,
130+
np.median, np.max, np.min, np.cumprod, np.cumsum]]
130131

131132

132133
@pytest.fixture(params=_cython_table)

0 commit comments

Comments
 (0)