@@ -367,28 +367,39 @@ def unique_nulls_fixture(request):
367367TIMEZONES = [None , 'UTC' , 'US/Eastern' , 'Asia/Tokyo' , 'dateutil/US/Pacific' ,
368368 'dateutil/Asia/Singapore' , tzutc (), tzlocal (), FixedOffset (300 ),
369369 FixedOffset (0 ), FixedOffset (- 300 )]
370+ TIMEZONE_IDS = ['None' , 'UTC' , 'US/Eastern' , 'Asia/Tokyp' ,
371+ 'dateutil/US/Pacific' , 'dateutil/Asia/Singapore' ,
372+ 'dateutil.tz.tzutz()' , 'dateutil.tz.tzlocal()' ,
373+ 'pytz.FixedOffset(300)' , 'pytz.FixedOffset(0)' ,
374+ 'pytz.FixedOffset(-300)' ]
370375
371376
372- @td .parametrize_fixture_doc (str (TIMEZONES ))
373- @pytest .fixture (params = TIMEZONES )
377+ @td .parametrize_fixture_doc (str (TIMEZONE_IDS ))
378+ @pytest .fixture (params = TIMEZONES , ids = TIMEZONE_IDS )
374379def tz_naive_fixture (request ):
375380 """
376381 Fixture for trying timezones including default (None): {0}
377382 """
378383 return request .param
379384
380385
381- @td .parametrize_fixture_doc (str (TIMEZONES [1 :]))
382- @pytest .fixture (params = TIMEZONES [1 :])
386+ @td .parametrize_fixture_doc (str (TIMEZONE_IDS [1 :]))
387+ @pytest .fixture (params = TIMEZONES [1 :], ids = TIMEZONE_IDS [ 1 :] )
383388def tz_aware_fixture (request ):
384389 """
385390 Fixture for trying explicit timezones: {0}
386391 """
387392 return request .param
388393
389394
395+ # Generate cartesian product of tz_aware_fixture:
396+ tz_aware_fixture2 = tz_aware_fixture
397+
398+
390399# ----------------------------------------------------------------
391400# Dtypes
401+
402+
392403UNSIGNED_INT_DTYPES = ["uint8" , "uint16" , "uint32" , "uint64" ]
393404UNSIGNED_EA_INT_DTYPES = ["UInt8" , "UInt16" , "UInt32" , "UInt64" ]
394405SIGNED_INT_DTYPES = [int , "int8" , "int16" , "int32" , "int64" ]
@@ -400,16 +411,16 @@ def tz_aware_fixture(request):
400411COMPLEX_DTYPES = [complex , "complex64" , "complex128" ]
401412STRING_DTYPES = [str , 'str' , 'U' ]
402413
403- DATETIME_DTYPES = ['datetime64[ns]' , 'M8[ns]' ]
404- TIMEDELTA_DTYPES = ['timedelta64[ns]' , 'm8[ns]' ]
414+ DATETIME64_DTYPES = ['datetime64[ns]' , 'M8[ns]' ]
415+ TIMEDELTA64_DTYPES = ['timedelta64[ns]' , 'm8[ns]' ]
405416
406417BOOL_DTYPES = [bool , 'bool' ]
407418BYTES_DTYPES = [bytes , 'bytes' ]
408419OBJECT_DTYPES = [object , 'object' ]
409420
410421ALL_REAL_DTYPES = FLOAT_DTYPES + ALL_INT_DTYPES
411422ALL_NUMPY_DTYPES = (ALL_REAL_DTYPES + COMPLEX_DTYPES + STRING_DTYPES
412- + DATETIME_DTYPES + TIMEDELTA_DTYPES + BOOL_DTYPES
423+ + DATETIME64_DTYPES + TIMEDELTA64_DTYPES + BOOL_DTYPES
413424 + OBJECT_DTYPES + BYTES_DTYPES * PY3 ) # bytes only for PY3
414425
415426
@@ -424,6 +435,46 @@ def string_dtype(request):
424435 return request .param
425436
426437
438+ @pytest .fixture (params = BYTES_DTYPES )
439+ def bytes_dtype (request ):
440+ """Parametrized fixture for bytes dtypes.
441+
442+ * bytes
443+ * 'bytes'
444+ """
445+ return request .param
446+
447+
448+ @pytest .fixture (params = OBJECT_DTYPES )
449+ def object_dtype (request ):
450+ """Parametrized fixture for object dtypes.
451+
452+ * object
453+ * 'object'
454+ """
455+ return request .param
456+
457+
458+ @pytest .fixture (params = DATETIME64_DTYPES )
459+ def datetime64_dtype (request ):
460+ """Parametrized fixture for datetime/timedelta dtypes.
461+
462+ * 'datetime64[ns]'
463+ * 'M8[ns]'
464+ """
465+ return request .param
466+
467+
468+ @pytest .fixture (params = TIMEDELTA64_DTYPES )
469+ def timedelta64_dtype (request ):
470+ """Parametrized fixture for datetime/timedelta dtypes.
471+
472+ * 'timedelta64[ns]'
473+ * 'm8[ns]'
474+ """
475+ return request .param
476+
477+
427478@pytest .fixture (params = FLOAT_DTYPES )
428479def float_dtype (request ):
429480 """
0 commit comments