Skip to content

CLN/TST: Remove pandas_testing_mode #49105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 || '' }}
Expand Down
25 changes: 0 additions & 25 deletions pandas/_testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
Counter,
Iterable,
)
import warnings

import numpy as np

Expand Down Expand Up @@ -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:
"""
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 0 additions & 10 deletions pandas/tests/io/pytables/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()