@@ -386,8 +386,17 @@ def tz_aware_fixture(request):
386
386
COMPLEX_DTYPES = [complex , "complex64" , "complex128" ]
387
387
STRING_DTYPES = [str , 'str' , 'U' ]
388
388
389
+ DATETIME_DTYPES = ['datetime64[ns]' , 'M8[ns]' ]
390
+ TIMEDELTA_DTYPES = ['timedelta64[ns]' , 'm8[ns]' ]
391
+
392
+ BOOL_DTYPES = [bool , 'bool' ]
393
+ BYTES_DTYPES = [bytes , 'bytes' ]
394
+ OBJECT_DTYPES = [object , 'object' ]
395
+
389
396
ALL_REAL_DTYPES = FLOAT_DTYPES + ALL_INT_DTYPES
390
- ALL_NUMPY_DTYPES = ALL_REAL_DTYPES + COMPLEX_DTYPES + STRING_DTYPES
397
+ ALL_NUMPY_DTYPES = (ALL_REAL_DTYPES + COMPLEX_DTYPES + STRING_DTYPES
398
+ + DATETIME_DTYPES + TIMEDELTA_DTYPES + BOOL_DTYPES
399
+ + OBJECT_DTYPES + BYTES_DTYPES * PY3 ) # bytes only for PY3
391
400
392
401
393
402
@pytest .fixture (params = STRING_DTYPES )
@@ -406,8 +415,9 @@ def float_dtype(request):
406
415
"""
407
416
Parameterized fixture for float dtypes.
408
417
409
- * float32
410
- * float64
418
+ * float
419
+ * 'float32'
420
+ * 'float64'
411
421
"""
412
422
413
423
return request .param
@@ -418,8 +428,9 @@ def complex_dtype(request):
418
428
"""
419
429
Parameterized fixture for complex dtypes.
420
430
421
- * complex64
422
- * complex128
431
+ * complex
432
+ * 'complex64'
433
+ * 'complex128'
423
434
"""
424
435
425
436
return request .param
@@ -430,10 +441,11 @@ def sint_dtype(request):
430
441
"""
431
442
Parameterized fixture for signed integer dtypes.
432
443
433
- * int8
434
- * int16
435
- * int32
436
- * int64
444
+ * int
445
+ * 'int8'
446
+ * 'int16'
447
+ * 'int32'
448
+ * 'int64'
437
449
"""
438
450
439
451
return request .param
@@ -444,10 +456,10 @@ def uint_dtype(request):
444
456
"""
445
457
Parameterized fixture for unsigned integer dtypes.
446
458
447
- * uint8
448
- * uint16
449
- * uint32
450
- * uint64
459
+ * ' uint8'
460
+ * ' uint16'
461
+ * ' uint32'
462
+ * ' uint64'
451
463
"""
452
464
453
465
return request .param
@@ -456,16 +468,17 @@ def uint_dtype(request):
456
468
@pytest .fixture (params = ALL_INT_DTYPES )
457
469
def any_int_dtype (request ):
458
470
"""
459
- Parameterized fixture for any integer dtypes .
471
+ Parameterized fixture for any integer dtype .
460
472
461
- * int8
462
- * uint8
463
- * int16
464
- * uint16
465
- * int32
466
- * uint32
467
- * int64
468
- * uint64
473
+ * int
474
+ * 'int8'
475
+ * 'uint8'
476
+ * 'int16'
477
+ * 'uint16'
478
+ * 'int32'
479
+ * 'uint32'
480
+ * 'int64'
481
+ * 'uint64'
469
482
"""
470
483
471
484
return request .param
@@ -474,18 +487,20 @@ def any_int_dtype(request):
474
487
@pytest .fixture (params = ALL_REAL_DTYPES )
475
488
def any_real_dtype (request ):
476
489
"""
477
- Parameterized fixture for any (purely) real numeric dtypes .
490
+ Parameterized fixture for any (purely) real numeric dtype .
478
491
479
- * int8
480
- * uint8
481
- * int16
482
- * uint16
483
- * int32
484
- * uint32
485
- * int64
486
- * uint64
487
- * float32
488
- * float64
492
+ * int
493
+ * 'int8'
494
+ * 'uint8'
495
+ * 'int16'
496
+ * 'uint16'
497
+ * 'int32'
498
+ * 'uint32'
499
+ * 'int64'
500
+ * 'uint64'
501
+ * float
502
+ * 'float32'
503
+ * 'float64'
489
504
"""
490
505
491
506
return request .param
@@ -496,21 +511,34 @@ def any_numpy_dtype(request):
496
511
"""
497
512
Parameterized fixture for all numpy dtypes.
498
513
499
- * int8
500
- * uint8
501
- * int16
502
- * uint16
503
- * int32
504
- * uint32
505
- * int64
506
- * uint64
507
- * float32
508
- * float64
509
- * complex64
510
- * complex128
514
+ * bool
515
+ * 'bool'
516
+ * int
517
+ * 'int8'
518
+ * 'uint8'
519
+ * 'int16'
520
+ * 'uint16'
521
+ * 'int32'
522
+ * 'uint32'
523
+ * 'int64'
524
+ * 'uint64'
525
+ * float
526
+ * 'float32'
527
+ * 'float64'
528
+ * complex
529
+ * 'complex64'
530
+ * 'complex128'
511
531
* str
512
532
* 'str'
513
533
* 'U'
534
+ * bytes
535
+ * 'bytes'
536
+ * 'datetime64[ns]'
537
+ * 'M8[ns]'
538
+ * 'timedelta64[ns]'
539
+ * 'm8[ns]'
540
+ * object
541
+ * 'object'
514
542
"""
515
543
516
544
return request .param
0 commit comments