@@ -563,13 +563,209 @@ def test_fillna_frame(self, data_missing, using_array_manager, request):
563563 super ().test_fillna_frame (data_missing )
564564
565565
566+ class TestBasePrinting (base .BasePrintingTests ):
567+ def test_series_repr (self , data , request ):
568+ pa_dtype = data .dtype .pyarrow_dtype
569+ if (
570+ pa .types .is_date (pa_dtype )
571+ or pa .types .is_duration (pa_dtype )
572+ or (pa .types .is_timestamp (pa_dtype ) and pa_dtype .tz is None )
573+ ):
574+ request .node .add_marker (
575+ pytest .mark .xfail (
576+ raises = TypeError ,
577+ reason = "GH 47514: _concat_datetime expects axis arg." ,
578+ )
579+ )
580+ super ().test_series_repr (data )
581+
582+ def test_dataframe_repr (self , data , request ):
583+ pa_dtype = data .dtype .pyarrow_dtype
584+ if (
585+ pa .types .is_date (pa_dtype )
586+ or pa .types .is_duration (pa_dtype )
587+ or (pa .types .is_timestamp (pa_dtype ) and pa_dtype .tz is None )
588+ ):
589+ request .node .add_marker (
590+ pytest .mark .xfail (
591+ raises = TypeError ,
592+ reason = "GH 47514: _concat_datetime expects axis arg." ,
593+ )
594+ )
595+ super ().test_dataframe_repr (data )
596+
597+
598+ class TestBaseReshaping (base .BaseReshapingTests ):
599+ @pytest .mark .parametrize ("in_frame" , [True , False ])
600+ def test_concat (self , data , in_frame , request ):
601+ pa_dtype = data .dtype .pyarrow_dtype
602+ if (
603+ pa .types .is_date (pa_dtype )
604+ or pa .types .is_duration (pa_dtype )
605+ or (pa .types .is_timestamp (pa_dtype ) and pa_dtype .tz is None )
606+ ):
607+ request .node .add_marker (
608+ pytest .mark .xfail (
609+ raises = TypeError ,
610+ reason = "GH 47514: _concat_datetime expects axis arg." ,
611+ )
612+ )
613+ super ().test_concat (data , in_frame )
614+
615+ @pytest .mark .parametrize ("in_frame" , [True , False ])
616+ def test_concat_all_na_block (self , data_missing , in_frame , request ):
617+ pa_dtype = data_missing .dtype .pyarrow_dtype
618+ if (
619+ pa .types .is_date (pa_dtype )
620+ or pa .types .is_duration (pa_dtype )
621+ or (pa .types .is_timestamp (pa_dtype ) and pa_dtype .tz is None )
622+ ):
623+ request .node .add_marker (
624+ pytest .mark .xfail (
625+ raises = TypeError ,
626+ reason = "GH 47514: _concat_datetime expects axis arg." ,
627+ )
628+ )
629+ super ().test_concat_all_na_block (data_missing , in_frame )
630+
631+ def test_concat_columns (self , data , na_value , request ):
632+ tz = getattr (data .dtype .pyarrow_dtype , "tz" , None )
633+ if pa_version_under2p0 and tz not in (None , "UTC" ):
634+ request .node .add_marker (
635+ pytest .mark .xfail (
636+ reason = f"Not supported by pyarrow < 2.0 with timestamp type { tz } "
637+ )
638+ )
639+ super ().test_concat_columns (data , na_value )
640+
641+ def test_concat_extension_arrays_copy_false (self , data , na_value , request ):
642+ tz = getattr (data .dtype .pyarrow_dtype , "tz" , None )
643+ if pa_version_under2p0 and tz not in (None , "UTC" ):
644+ request .node .add_marker (
645+ pytest .mark .xfail (
646+ reason = f"Not supported by pyarrow < 2.0 with timestamp type { tz } "
647+ )
648+ )
649+ super ().test_concat_extension_arrays_copy_false (data , na_value )
650+
651+ def test_concat_with_reindex (self , data , request , using_array_manager ):
652+ pa_dtype = data .dtype .pyarrow_dtype
653+ if pa .types .is_duration (pa_dtype ):
654+ request .node .add_marker (
655+ pytest .mark .xfail (
656+ raises = TypeError ,
657+ reason = "GH 47514: _concat_datetime expects axis arg." ,
658+ )
659+ )
660+ elif pa .types .is_date (pa_dtype ) or (
661+ pa .types .is_timestamp (pa_dtype ) and pa_dtype .tz is None
662+ ):
663+ request .node .add_marker (
664+ pytest .mark .xfail (
665+ raises = AttributeError if not using_array_manager else TypeError ,
666+ reason = "GH 34986" ,
667+ )
668+ )
669+ super ().test_concat_with_reindex (data )
670+
671+ def test_align (self , data , na_value , request ):
672+ tz = getattr (data .dtype .pyarrow_dtype , "tz" , None )
673+ if pa_version_under2p0 and tz not in (None , "UTC" ):
674+ request .node .add_marker (
675+ pytest .mark .xfail (
676+ reason = f"Not supported by pyarrow < 2.0 with timestamp type { tz } "
677+ )
678+ )
679+ super ().test_align (data , na_value )
680+
681+ def test_align_frame (self , data , na_value , request ):
682+ tz = getattr (data .dtype .pyarrow_dtype , "tz" , None )
683+ if pa_version_under2p0 and tz not in (None , "UTC" ):
684+ request .node .add_marker (
685+ pytest .mark .xfail (
686+ reason = f"Not supported by pyarrow < 2.0 with timestamp type { tz } "
687+ )
688+ )
689+ super ().test_align_frame (data , na_value )
690+
691+ def test_align_series_frame (self , data , na_value , request ):
692+ tz = getattr (data .dtype .pyarrow_dtype , "tz" , None )
693+ if pa_version_under2p0 and tz not in (None , "UTC" ):
694+ request .node .add_marker (
695+ pytest .mark .xfail (
696+ reason = f"Not supported by pyarrow < 2.0 with timestamp type { tz } "
697+ )
698+ )
699+ super ().test_align_series_frame (data , na_value )
700+
701+ def test_merge (self , data , na_value , request ):
702+ tz = getattr (data .dtype .pyarrow_dtype , "tz" , None )
703+ if pa_version_under2p0 and tz not in (None , "UTC" ):
704+ request .node .add_marker (
705+ pytest .mark .xfail (
706+ reason = f"Not supported by pyarrow < 2.0 with timestamp type { tz } "
707+ )
708+ )
709+ super ().test_merge (data , na_value )
710+
711+ def test_merge_on_extension_array (self , data , request ):
712+ pa_dtype = data .dtype .pyarrow_dtype
713+ if pa .types .is_date (pa_dtype ) or (
714+ pa .types .is_timestamp (pa_dtype ) and pa_dtype .tz is None
715+ ):
716+ request .node .add_marker (
717+ pytest .mark .xfail (
718+ raises = AttributeError ,
719+ reason = "GH 34986" ,
720+ )
721+ )
722+ super ().test_merge_on_extension_array (data )
723+
724+ def test_merge_on_extension_array_duplicates (self , data , request ):
725+ pa_dtype = data .dtype .pyarrow_dtype
726+ if pa .types .is_date (pa_dtype ) or (
727+ pa .types .is_timestamp (pa_dtype ) and pa_dtype .tz is None
728+ ):
729+ request .node .add_marker (
730+ pytest .mark .xfail (
731+ raises = AttributeError ,
732+ reason = "GH 34986" ,
733+ )
734+ )
735+ super ().test_merge_on_extension_array_duplicates (data )
736+
737+ def test_ravel (self , data , request ):
738+ tz = getattr (data .dtype .pyarrow_dtype , "tz" , None )
739+ if pa_version_under2p0 and tz not in (None , "UTC" ):
740+ request .node .add_marker (
741+ pytest .mark .xfail (
742+ reason = f"Not supported by pyarrow < 2.0 with timestamp type { tz } "
743+ )
744+ )
745+ super ().test_ravel (data )
746+
747+ @pytest .mark .xfail (reason = "GH 45419: pyarrow.ChunkedArray does not support views" )
748+ def test_transpose (self , data ):
749+ super ().test_transpose (data )
750+
751+ def test_transpose_frame (self , data , request ):
752+ tz = getattr (data .dtype .pyarrow_dtype , "tz" , None )
753+ if pa_version_under2p0 and tz not in (None , "UTC" ):
754+ request .node .add_marker (
755+ pytest .mark .xfail (
756+ reason = f"Not supported by pyarrow < 2.0 with timestamp type { tz } "
757+ )
758+ )
759+ super ().test_transpose_frame (data )
760+
761+
566762class TestBaseSetitem (base .BaseSetitemTests ):
567763 def test_setitem_scalar_series (self , data , box_in_series , request ):
568764 tz = getattr (data .dtype .pyarrow_dtype , "tz" , None )
569765 if pa_version_under2p0 and tz not in (None , "UTC" ):
570766 request .node .add_marker (
571767 pytest .mark .xfail (
572- reason = ( f"Not supported by pyarrow < 2.0 with timestamp type { tz } " )
768+ reason = f"Not supported by pyarrow < 2.0 with timestamp type { tz } "
573769 )
574770 )
575771 super ().test_setitem_scalar_series (data , box_in_series )
0 commit comments