Skip to content

Commit f7db921

Browse files
mroeschkenoatamir
authored andcommitted
CLN/TST: Remove pandas_testing_mode (pandas-dev#49105)
1 parent 7f89490 commit f7db921

File tree

3 files changed

+0
-37
lines changed

3 files changed

+0
-37
lines changed

.github/workflows/ubuntu.yml

-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ jobs:
7777
- name: "Numpy Dev"
7878
env_file: actions-310-numpydev.yaml
7979
pattern: "not slow and not network and not single_cpu"
80-
pandas_testing_mode: "deprecate"
8180
test_args: "-W error::DeprecationWarning:numpy -W error::FutureWarning:numpy"
8281
exclude:
8382
- env_file: actions-39.yaml
@@ -96,7 +95,6 @@ jobs:
9695
EXTRA_APT: ${{ matrix.extra_apt || '' }}
9796
LANG: ${{ matrix.lang || '' }}
9897
LC_ALL: ${{ matrix.lc_all || '' }}
99-
PANDAS_TESTING_MODE: ${{ matrix.pandas_testing_mode || '' }}
10098
PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }}
10199
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
102100
TEST_ARGS: ${{ matrix.test_args || '' }}

pandas/_testing/__init__.py

-25
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
Counter,
1616
Iterable,
1717
)
18-
import warnings
1918

2019
import numpy as np
2120

@@ -236,28 +235,6 @@
236235

237236
EMPTY_STRING_PATTERN = re.compile("^$")
238237

239-
# set testing_mode
240-
_testing_mode_warnings = (DeprecationWarning, ResourceWarning)
241-
242-
243-
def set_testing_mode() -> None:
244-
# set the testing mode filters
245-
testing_mode = os.environ.get("PANDAS_TESTING_MODE", "None")
246-
if "deprecate" in testing_mode:
247-
for category in _testing_mode_warnings:
248-
warnings.simplefilter("always", category)
249-
250-
251-
def reset_testing_mode() -> None:
252-
# reset the testing mode filters
253-
testing_mode = os.environ.get("PANDAS_TESTING_MODE", "None")
254-
if "deprecate" in testing_mode:
255-
for category in _testing_mode_warnings:
256-
warnings.simplefilter("ignore", category)
257-
258-
259-
set_testing_mode()
260-
261238

262239
def reset_display_options() -> None:
263240
"""
@@ -1142,14 +1119,12 @@ def shares_memory(left, right) -> bool:
11421119
"randbool",
11431120
"rands",
11441121
"reset_display_options",
1145-
"reset_testing_mode",
11461122
"RNGContext",
11471123
"round_trip_localpath",
11481124
"round_trip_pathlib",
11491125
"round_trip_pickle",
11501126
"setitem",
11511127
"set_locale",
1152-
"set_testing_mode",
11531128
"set_timezone",
11541129
"shares_memory",
11551130
"SIGNED_INT_EA_DTYPES",

pandas/tests/io/pytables/conftest.py

-10
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,8 @@
22

33
import pytest
44

5-
import pandas._testing as tm
6-
75

86
@pytest.fixture
97
def setup_path():
108
"""Fixture for setup path"""
119
return f"tmp.__{uuid.uuid4()}__.h5"
12-
13-
14-
@pytest.fixture(scope="module", autouse=True)
15-
def setup_mode():
16-
"""Reset testing mode fixture"""
17-
tm.reset_testing_mode()
18-
yield
19-
tm.set_testing_mode()

0 commit comments

Comments
 (0)