diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c60522092739..78ebb75c1f495 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -184,6 +184,12 @@ jobs: pytest pandas/tests/dtypes/ pytest pandas/tests/generic/ pytest pandas/tests/indexes/ + pytest pandas/tests/io/test_* -m "not slow and not clipboard" + pytest pandas/tests/io/excel/ -m "not slow and not clipboard" + pytest pandas/tests/io/formats/ -m "not slow and not clipboard" + pytest pandas/tests/io/parser/ -m "not slow and not clipboard" + pytest pandas/tests/io/sas/ -m "not slow and not clipboard" + pytest pandas/tests/io/xml/ -m "not slow and not clipboard" pytest pandas/tests/libs/ pytest pandas/tests/plotting/ pytest pandas/tests/scalar/ diff --git a/pandas/tests/io/pytables/test_append.py b/pandas/tests/io/pytables/test_append.py index 8c324d73a7e54..7cf061d77ad7d 100644 --- a/pandas/tests/io/pytables/test_append.py +++ b/pandas/tests/io/pytables/test_append.py @@ -7,6 +7,7 @@ import pytest from pandas._libs.tslibs import Timestamp +import pandas.util._test_decorators as td import pandas as pd from pandas import ( @@ -24,7 +25,7 @@ ensure_clean_store, ) -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] @pytest.mark.filterwarnings("ignore:object name:tables.exceptions.NaturalNameWarning") diff --git a/pandas/tests/io/pytables/test_categorical.py b/pandas/tests/io/pytables/test_categorical.py index 858e38e40f017..177abdeedb88b 100644 --- a/pandas/tests/io/pytables/test_categorical.py +++ b/pandas/tests/io/pytables/test_categorical.py @@ -1,6 +1,8 @@ import numpy as np import pytest +import pandas.util._test_decorators as td + from pandas import ( Categorical, DataFrame, @@ -15,7 +17,7 @@ ensure_clean_store, ) -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_categorical(setup_path): diff --git a/pandas/tests/io/pytables/test_compat.py b/pandas/tests/io/pytables/test_compat.py index c7200385aa998..4688d7d2be40a 100644 --- a/pandas/tests/io/pytables/test_compat.py +++ b/pandas/tests/io/pytables/test_compat.py @@ -1,11 +1,15 @@ import pytest +import pandas.util._test_decorators as td + import pandas as pd import pandas._testing as tm from pandas.tests.io.pytables.common import ensure_clean_path tables = pytest.importorskip("tables") +pytestmark = td.skip_array_manager_not_yet_implemented + @pytest.fixture def pytables_hdf5_file(): diff --git a/pandas/tests/io/pytables/test_errors.py b/pandas/tests/io/pytables/test_errors.py index 2ae330e5139be..30b07fb572324 100644 --- a/pandas/tests/io/pytables/test_errors.py +++ b/pandas/tests/io/pytables/test_errors.py @@ -6,6 +6,8 @@ import numpy as np import pytest +import pandas.util._test_decorators as td + from pandas import ( CategoricalIndex, DataFrame, @@ -25,7 +27,7 @@ _maybe_adjust_name, ) -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_pass_spec_to_storer(setup_path): diff --git a/pandas/tests/io/pytables/test_file_handling.py b/pandas/tests/io/pytables/test_file_handling.py index 88e2b5f080282..943b1bb06b1f3 100644 --- a/pandas/tests/io/pytables/test_file_handling.py +++ b/pandas/tests/io/pytables/test_file_handling.py @@ -4,6 +4,7 @@ import pytest from pandas.compat import is_platform_little_endian +import pandas.util._test_decorators as td from pandas import ( DataFrame, @@ -26,7 +27,7 @@ Term, ) -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_mode(setup_path): diff --git a/pandas/tests/io/pytables/test_keys.py b/pandas/tests/io/pytables/test_keys.py index 02b79bd0fdbc1..1dc2c9411ed7b 100644 --- a/pandas/tests/io/pytables/test_keys.py +++ b/pandas/tests/io/pytables/test_keys.py @@ -1,5 +1,7 @@ import pytest +import pandas.util._test_decorators as td + from pandas import ( DataFrame, HDFStore, @@ -11,7 +13,7 @@ tables, ) -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_keys(setup_path): diff --git a/pandas/tests/io/pytables/test_put.py b/pandas/tests/io/pytables/test_put.py index 4f8c7c84a9fcc..20278914a4838 100644 --- a/pandas/tests/io/pytables/test_put.py +++ b/pandas/tests/io/pytables/test_put.py @@ -29,7 +29,7 @@ ) from pandas.util import _test_decorators as td -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_format_type(setup_path): diff --git a/pandas/tests/io/pytables/test_pytables_missing.py b/pandas/tests/io/pytables/test_pytables_missing.py index 9adb0a6d227da..fe474b7503e60 100644 --- a/pandas/tests/io/pytables/test_pytables_missing.py +++ b/pandas/tests/io/pytables/test_pytables_missing.py @@ -5,6 +5,8 @@ import pandas as pd import pandas._testing as tm +pytestmark = td.skip_array_manager_not_yet_implemented + @td.skip_if_installed("tables") def test_pytables_raises(): diff --git a/pandas/tests/io/pytables/test_read.py b/pandas/tests/io/pytables/test_read.py index 1c9e63c66aadb..5d1deb45eba8b 100644 --- a/pandas/tests/io/pytables/test_read.py +++ b/pandas/tests/io/pytables/test_read.py @@ -25,7 +25,7 @@ from pandas.io.pytables import TableIterator -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_read_missing_key_close_store(setup_path): diff --git a/pandas/tests/io/pytables/test_retain_attributes.py b/pandas/tests/io/pytables/test_retain_attributes.py index 16772d03c6d26..c6e2904f7e670 100644 --- a/pandas/tests/io/pytables/test_retain_attributes.py +++ b/pandas/tests/io/pytables/test_retain_attributes.py @@ -3,6 +3,7 @@ import pytest from pandas._libs.tslibs import Timestamp +import pandas.util._test_decorators as td from pandas import ( DataFrame, @@ -17,7 +18,7 @@ ensure_clean_store, ) -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_retain_index_attributes(setup_path): diff --git a/pandas/tests/io/pytables/test_round_trip.py b/pandas/tests/io/pytables/test_round_trip.py index 03d3d838a936c..84df613f9ee3e 100644 --- a/pandas/tests/io/pytables/test_round_trip.py +++ b/pandas/tests/io/pytables/test_round_trip.py @@ -30,7 +30,7 @@ _default_compressor = "blosc" -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_conv_read_write(setup_path): diff --git a/pandas/tests/io/pytables/test_select.py b/pandas/tests/io/pytables/test_select.py index 8ad5dbc049380..2a77a6b4fd76f 100644 --- a/pandas/tests/io/pytables/test_select.py +++ b/pandas/tests/io/pytables/test_select.py @@ -5,6 +5,7 @@ import pytest from pandas._libs.tslibs import Timestamp +import pandas.util._test_decorators as td import pandas as pd from pandas import ( @@ -29,7 +30,7 @@ from pandas.io.pytables import Term -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_select_columns_in_where(setup_path): diff --git a/pandas/tests/io/pytables/test_store.py b/pandas/tests/io/pytables/test_store.py index b0a11b5e7690e..24a4d35b5d94d 100644 --- a/pandas/tests/io/pytables/test_store.py +++ b/pandas/tests/io/pytables/test_store.py @@ -32,10 +32,6 @@ safe_close, ) -# TODO(ArrayManager) HDFStore relies on accessing the blocks -pytestmark = td.skip_array_manager_not_yet_implemented - - _default_compressor = "blosc" ignore_natural_naming_warning = pytest.mark.filterwarnings( "ignore:object name:tables.exceptions.NaturalNameWarning" @@ -46,7 +42,8 @@ read_hdf, ) -pytestmark = pytest.mark.single +# TODO(ArrayManager) HDFStore relies on accessing the blocks +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_context(setup_path): diff --git a/pandas/tests/io/pytables/test_subclass.py b/pandas/tests/io/pytables/test_subclass.py index 75b04f332e054..05c9f0c650986 100644 --- a/pandas/tests/io/pytables/test_subclass.py +++ b/pandas/tests/io/pytables/test_subclass.py @@ -1,5 +1,7 @@ import numpy as np +import pandas.util._test_decorators as td + from pandas import ( DataFrame, Series, @@ -12,6 +14,8 @@ read_hdf, ) +pytestmark = td.skip_array_manager_not_yet_implemented + class TestHDFStoreSubclass: # GH 33748 diff --git a/pandas/tests/io/pytables/test_time_series.py b/pandas/tests/io/pytables/test_time_series.py index 5e42dbde4b9f1..181f63563665b 100644 --- a/pandas/tests/io/pytables/test_time_series.py +++ b/pandas/tests/io/pytables/test_time_series.py @@ -3,6 +3,8 @@ import numpy as np import pytest +import pandas.util._test_decorators as td + from pandas import ( DataFrame, Series, @@ -10,7 +12,7 @@ ) from pandas.tests.io.pytables.common import ensure_clean_store -pytestmark = pytest.mark.single +pytestmark = [pytest.mark.single, td.skip_array_manager_not_yet_implemented] def test_store_datetime_fractional_secs(setup_path): diff --git a/pandas/tests/io/sas/test_sas7bdat.py b/pandas/tests/io/sas/test_sas7bdat.py index 5d847f7b6f2bd..bc9dc8e966e33 100644 --- a/pandas/tests/io/sas/test_sas7bdat.py +++ b/pandas/tests/io/sas/test_sas7bdat.py @@ -194,10 +194,13 @@ def test_compact_numerical_values(datapath): tm.assert_series_equal(result, expected, check_exact=True) -def test_many_columns(datapath): +def test_many_columns(datapath, using_array_manager): # Test for looking for column information in more places (PR #22628) fname = datapath("io", "sas", "data", "many_columns.sas7bdat") - with tm.assert_produces_warning(PerformanceWarning): + expected_warning = None + if not using_array_manager: + expected_warning = PerformanceWarning + with tm.assert_produces_warning(expected_warning): # Many DataFrame.insert calls df = pd.read_sas(fname, encoding="latin-1") diff --git a/pandas/tests/io/test_common.py b/pandas/tests/io/test_common.py index e483b5b5a8abb..e530f3e37883a 100644 --- a/pandas/tests/io/test_common.py +++ b/pandas/tests/io/test_common.py @@ -307,6 +307,7 @@ def test_write_fspath_all(self, writer_name, writer_kwargs, module): assert result == expected + @td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) IO HDF5 def test_write_fspath_hdf5(self): # Same test as write_fspath_all, except HDF5 files aren't # necessarily byte-for-byte identical for a given dataframe, so we'll @@ -431,7 +432,10 @@ def test_is_fsspec_url(): @pytest.mark.parametrize("encoding", [None, "utf-8"]) -@pytest.mark.parametrize("format", ["csv", "json"]) +@pytest.mark.parametrize( + "format", + ["csv", pytest.param("json", marks=td.skip_array_manager_not_yet_implemented)], +) def test_codecs_encoding(encoding, format): # GH39247 expected = tm.makeDataFrame() diff --git a/pandas/tests/io/test_fsspec.py b/pandas/tests/io/test_fsspec.py index d97aaa2ea2763..c1ba625610f13 100644 --- a/pandas/tests/io/test_fsspec.py +++ b/pandas/tests/io/test_fsspec.py @@ -166,6 +166,7 @@ def test_arrowparquet_options(fsspectest): assert fsspectest.test[0] == "parquet_read" +@td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) fastparquet @td.skip_if_no("fastparquet") def test_fastparquet_options(fsspectest): """Regression test for writing to a not-yet-existent GCS Parquet file.""" @@ -210,6 +211,7 @@ def test_s3_protocols(s3_resource, tips_file, protocol, s3so): ) +@td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) fastparquet @td.skip_if_no("s3fs") @td.skip_if_no("fastparquet") def test_s3_parquet(s3_resource, s3so): diff --git a/pandas/tests/io/test_gcs.py b/pandas/tests/io/test_gcs.py index bb2a042f9168b..3000aeea90a0f 100644 --- a/pandas/tests/io/test_gcs.py +++ b/pandas/tests/io/test_gcs.py @@ -44,7 +44,16 @@ def ls(self, path, **kwargs): @td.skip_if_no("gcsfs") -@pytest.mark.parametrize("format", ["csv", "json", "parquet", "excel", "markdown"]) +@pytest.mark.parametrize( + "format", + [ + "csv", + pytest.param("json", marks=td.skip_array_manager_not_yet_implemented), + "parquet", + "excel", + "markdown", + ], +) def test_to_read_gcs(gcs_buffer, format): """ Test that many to/read functions support GCS. diff --git a/pandas/tests/io/test_parquet.py b/pandas/tests/io/test_parquet.py index edb20c7aa9254..878c6c419bbf8 100644 --- a/pandas/tests/io/test_parquet.py +++ b/pandas/tests/io/test_parquet.py @@ -41,9 +41,11 @@ _HAVE_FASTPARQUET = False -pytestmark = pytest.mark.filterwarnings( - "ignore:RangeIndex.* is deprecated:DeprecationWarning" -) +pytestmark = [ + pytest.mark.filterwarnings("ignore:RangeIndex.* is deprecated:DeprecationWarning"), + # TODO(ArrayManager) fastparquet / pyarrow rely on BlockManager internals + td.skip_array_manager_not_yet_implemented, +] # setup engines & skips diff --git a/pandas/tests/io/test_pickle.py b/pandas/tests/io/test_pickle.py index 8f5a7673fa45f..bb3c7afd8ec34 100644 --- a/pandas/tests/io/test_pickle.py +++ b/pandas/tests/io/test_pickle.py @@ -54,6 +54,10 @@ lzma = import_lzma() +# TODO(ArrayManager) pickling +pytestmark = td.skip_array_manager_not_yet_implemented + + @pytest.fixture(scope="module") def current_pickle_data(): # our current version pickle data diff --git a/pandas/tests/io/test_stata.py b/pandas/tests/io/test_stata.py index 05a6b3c360c61..3ba5835331fe5 100644 --- a/pandas/tests/io/test_stata.py +++ b/pandas/tests/io/test_stata.py @@ -12,8 +12,6 @@ import numpy as np import pytest -import pandas.util._test_decorators as td - from pandas.core.dtypes.common import is_categorical_dtype import pandas as pd @@ -35,9 +33,6 @@ read_stata, ) -# TODO(ArrayManager) the stata code relies on BlockManager internals (eg blknos) -pytestmark = td.skip_array_manager_not_yet_implemented - @pytest.fixture() def mixed_frame(): diff --git a/pandas/tests/io/test_user_agent.py b/pandas/tests/io/test_user_agent.py index d2f6a837cc885..d7d3768fe3371 100644 --- a/pandas/tests/io/test_user_agent.py +++ b/pandas/tests/io/test_user_agent.py @@ -189,7 +189,13 @@ def do_GET(self): marks=td.skip_array_manager_not_yet_implemented, ), (ParquetPyArrowUserAgentResponder, pd.read_parquet, "pyarrow"), - (ParquetFastParquetUserAgentResponder, pd.read_parquet, "fastparquet"), + pytest.param( + ParquetFastParquetUserAgentResponder, + pd.read_parquet, + "fastparquet", + # TODO(ArrayManager) fastparquet + marks=td.skip_array_manager_not_yet_implemented, + ), (PickleUserAgentResponder, pd.read_pickle, None), (StataUserAgentResponder, pd.read_stata, None), (GzippedCSVUserAgentResponder, pd.read_csv, None), @@ -234,7 +240,13 @@ def test_server_and_default_headers(responder, read_method, parquet_engine): marks=td.skip_array_manager_not_yet_implemented, ), (ParquetPyArrowUserAgentResponder, pd.read_parquet, "pyarrow"), - (ParquetFastParquetUserAgentResponder, pd.read_parquet, "fastparquet"), + pytest.param( + ParquetFastParquetUserAgentResponder, + pd.read_parquet, + "fastparquet", + # TODO(ArrayManager) fastparquet + marks=td.skip_array_manager_not_yet_implemented, + ), (PickleUserAgentResponder, pd.read_pickle, None), (StataUserAgentResponder, pd.read_stata, None), (GzippedCSVUserAgentResponder, pd.read_csv, None), diff --git a/pandas/tests/io/xml/test_to_xml.py b/pandas/tests/io/xml/test_to_xml.py index 97793ce8f65b8..b0ee9dbfac26e 100644 --- a/pandas/tests/io/xml/test_to_xml.py +++ b/pandas/tests/io/xml/test_to_xml.py @@ -1172,6 +1172,7 @@ def test_style_to_string(): assert out_xml == out_str +@td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) JSON @td.skip_if_no("lxml") def test_style_to_json(): xsl = """\