diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 260c857e608b3..0e966f05bbc28 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -77,7 +77,6 @@ jobs: - name: "Numpy Dev" env_file: actions-310-numpydev.yaml pattern: "not slow and not network and not single_cpu" - pandas_testing_mode: "deprecate" test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy" exclude: - env_file: actions-39.yaml @@ -96,7 +95,6 @@ jobs: EXTRA_APT: ${{ matrix.extra_apt || '' }} LANG: ${{ matrix.lang || '' }} LC_ALL: ${{ matrix.lc_all || '' }} - PANDAS_TESTING_MODE: ${{ matrix.pandas_testing_mode || '' }} PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }} PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }} TEST_ARGS: ${{ matrix.test_args || '' }} diff --git a/pandas/_testing/__init__.py b/pandas/_testing/__init__.py index ce6b6ceea5604..9e95617e249c7 100644 --- a/pandas/_testing/__init__.py +++ b/pandas/_testing/__init__.py @@ -15,7 +15,6 @@ Counter, Iterable, ) -import warnings import numpy as np @@ -236,28 +235,6 @@ EMPTY_STRING_PATTERN = re.compile("^$") -# set testing_mode -_testing_mode_warnings = (DeprecationWarning, ResourceWarning) - - -def set_testing_mode() -> None: - # set the testing mode filters - testing_mode = os.environ.get("PANDAS_TESTING_MODE", "None") - if "deprecate" in testing_mode: - for category in _testing_mode_warnings: - warnings.simplefilter("always", category) - - -def reset_testing_mode() -> None: - # reset the testing mode filters - testing_mode = os.environ.get("PANDAS_TESTING_MODE", "None") - if "deprecate" in testing_mode: - for category in _testing_mode_warnings: - warnings.simplefilter("ignore", category) - - -set_testing_mode() - def reset_display_options() -> None: """ @@ -1142,14 +1119,12 @@ def shares_memory(left, right) -> bool: "randbool", "rands", "reset_display_options", - "reset_testing_mode", "RNGContext", "round_trip_localpath", "round_trip_pathlib", "round_trip_pickle", "setitem", "set_locale", - "set_testing_mode", "set_timezone", "shares_memory", "SIGNED_INT_EA_DTYPES", diff --git a/pandas/tests/io/pytables/conftest.py b/pandas/tests/io/pytables/conftest.py index bbd815b9c6309..466e4ae8bb99c 100644 --- a/pandas/tests/io/pytables/conftest.py +++ b/pandas/tests/io/pytables/conftest.py @@ -2,18 +2,8 @@ import pytest -import pandas._testing as tm - @pytest.fixture def setup_path(): """Fixture for setup path""" return f"tmp.__{uuid.uuid4()}__.h5" - - -@pytest.fixture(scope="module", autouse=True) -def setup_mode(): - """Reset testing mode fixture""" - tm.reset_testing_mode() - yield - tm.set_testing_mode()