@@ -376,19 +376,25 @@ def unique_nulls_fixture(request):
376
376
FixedOffset (0 ), FixedOffset (- 300 ), timezone .utc ,
377
377
timezone (timedelta (hours = 1 )),
378
378
timezone (timedelta (hours = - 1 ), name = 'foo' )]
379
+ TIMEZONE_IDS = ['None' , 'UTC' , 'US/Eastern' , 'Asia/Tokyp' ,
380
+ 'dateutil/US/Pacific' , 'dateutil/Asia/Singapore' ,
381
+ 'dateutil.tz.tzutz()' , 'dateutil.tz.tzlocal()' ,
382
+ 'pytz.FixedOffset(300)' , 'pytz.FixedOffset(0)' ,
383
+ 'pytz.FixedOffset(-300)' , 'datetime.timezone.utc' ,
384
+ 'datetime.timezone.+1' , 'datetime.timezone.-1.named' ]
379
385
380
386
381
- @td .parametrize_fixture_doc (str (TIMEZONES ))
382
- @pytest .fixture (params = TIMEZONES )
387
+ @td .parametrize_fixture_doc (str (TIMEZONE_IDS ))
388
+ @pytest .fixture (params = TIMEZONES , ids = TIMEZONE_IDS )
383
389
def tz_naive_fixture (request ):
384
390
"""
385
391
Fixture for trying timezones including default (None): {0}
386
392
"""
387
393
return request .param
388
394
389
395
390
- @td .parametrize_fixture_doc (str (TIMEZONES [1 :]))
391
- @pytest .fixture (params = TIMEZONES [1 :])
396
+ @td .parametrize_fixture_doc (str (TIMEZONE_IDS [1 :]))
397
+ @pytest .fixture (params = TIMEZONES [1 :], ids = TIMEZONE_IDS [ 1 :] )
392
398
def tz_aware_fixture (request ):
393
399
"""
394
400
Fixture for trying explicit timezones: {0}
@@ -409,16 +415,16 @@ def tz_aware_fixture(request):
409
415
COMPLEX_DTYPES = [complex , "complex64" , "complex128" ]
410
416
STRING_DTYPES = [str , 'str' , 'U' ]
411
417
412
- DATETIME_DTYPES = ['datetime64[ns]' , 'M8[ns]' ]
413
- TIMEDELTA_DTYPES = ['timedelta64[ns]' , 'm8[ns]' ]
418
+ DATETIME64_DTYPES = ['datetime64[ns]' , 'M8[ns]' ]
419
+ TIMEDELTA64_DTYPES = ['timedelta64[ns]' , 'm8[ns]' ]
414
420
415
421
BOOL_DTYPES = [bool , 'bool' ]
416
422
BYTES_DTYPES = [bytes , 'bytes' ]
417
423
OBJECT_DTYPES = [object , 'object' ]
418
424
419
425
ALL_REAL_DTYPES = FLOAT_DTYPES + ALL_INT_DTYPES
420
426
ALL_NUMPY_DTYPES = (ALL_REAL_DTYPES + COMPLEX_DTYPES + STRING_DTYPES +
421
- DATETIME_DTYPES + TIMEDELTA_DTYPES + BOOL_DTYPES +
427
+ DATETIME64_DTYPES + TIMEDELTA64_DTYPES + BOOL_DTYPES +
422
428
OBJECT_DTYPES + BYTES_DTYPES )
423
429
424
430
0 commit comments