conftest.py 359 B

123456789101112131415
  1. import pytest
  2. from pandas import Categorical
  3. @pytest.fixture(params=[True, False])
  4. def allow_fill(request):
  5. """Boolean 'allow_fill' parameter for Categorical.take"""
  6. return request.param
  7. @pytest.fixture
  8. def factor():
  9. """Fixture returning a Categorical object"""
  10. return Categorical(["a", "b", "b", "a", "a", "c", "c", "c"], ordered=True)