conftest.py 723 B

123456789101112131415161718192021222324252627
  1. import pytest
  2. @pytest.fixture(params=[None, False])
  3. def sort(request):
  4. """
  5. Valid values for the 'sort' parameter used in the Index
  6. setops methods (intersection, union, etc.)
  7. Caution:
  8. Don't confuse this one with the "sort" fixture used
  9. for DataFrame.append or concat. That one has
  10. parameters [True, False].
  11. We can't combine them as sort=True is not permitted
  12. in the Index setops methods.
  13. """
  14. return request.param
  15. @pytest.fixture(params=["D", "3D", "-3D", "H", "2H", "-2H", "T", "2T", "S", "-3S"])
  16. def freq_sample(request):
  17. """
  18. Valid values for 'freq' parameter used to create date_range and
  19. timedelta_range..
  20. """
  21. return request.param