Skip to content

Commit f2aea09

Browse files
h-vetinarijreback
authored andcommitted
TST: tests for maybe_promote (precursor to #23982) (#25637)
1 parent dda4c1a commit f2aea09

File tree

2 files changed

+721
-0
lines changed

2 files changed

+721
-0
lines changed

pandas/conftest.py

+44
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ def tz_aware_fixture(request):
399399
return request.param
400400

401401

402+
# Generate cartesian product of tz_aware_fixture:
403+
tz_aware_fixture2 = tz_aware_fixture
404+
405+
402406
# ----------------------------------------------------------------
403407
# Dtypes
404408
# ----------------------------------------------------------------
@@ -438,6 +442,46 @@ def string_dtype(request):
438442
return request.param
439443

440444

445+
@pytest.fixture(params=BYTES_DTYPES)
446+
def bytes_dtype(request):
447+
"""Parametrized fixture for bytes dtypes.
448+
449+
* bytes
450+
* 'bytes'
451+
"""
452+
return request.param
453+
454+
455+
@pytest.fixture(params=OBJECT_DTYPES)
456+
def object_dtype(request):
457+
"""Parametrized fixture for object dtypes.
458+
459+
* object
460+
* 'object'
461+
"""
462+
return request.param
463+
464+
465+
@pytest.fixture(params=DATETIME64_DTYPES)
466+
def datetime64_dtype(request):
467+
"""Parametrized fixture for datetime64 dtypes.
468+
469+
* 'datetime64[ns]'
470+
* 'M8[ns]'
471+
"""
472+
return request.param
473+
474+
475+
@pytest.fixture(params=TIMEDELTA64_DTYPES)
476+
def timedelta64_dtype(request):
477+
"""Parametrized fixture for timedelta64 dtypes.
478+
479+
* 'timedelta64[ns]'
480+
* 'm8[ns]'
481+
"""
482+
return request.param
483+
484+
441485
@pytest.fixture(params=FLOAT_DTYPES)
442486
def float_dtype(request):
443487
"""

0 commit comments

Comments
 (0)