|
1 | 1 | from __future__ import annotations
|
2 | 2 |
|
3 |
| -import subprocess |
4 |
| -import sys |
5 |
| - |
6 | 3 | import pytest
|
7 | 4 |
|
8 | 5 | import pandas as pd
|
@@ -260,36 +257,6 @@ def test_testing(self):
|
260 | 257 |
|
261 | 258 | self.check(testing, self.funcs)
|
262 | 259 |
|
263 |
| - def test_util_testing_deprecated(self): |
264 |
| - # avoid cache state affecting the test |
265 |
| - sys.modules.pop("pandas.util.testing", None) |
266 |
| - |
267 |
| - with tm.assert_produces_warning(FutureWarning) as m: |
268 |
| - import pandas.util.testing # noqa: F401 |
269 |
| - |
270 |
| - assert "pandas.util.testing is deprecated" in str(m[0].message) |
271 |
| - assert "pandas.testing instead" in str(m[0].message) |
272 |
| - |
273 |
| - def test_util_testing_deprecated_direct(self): |
274 |
| - # avoid cache state affecting the test |
275 |
| - sys.modules.pop("pandas.util.testing", None) |
276 |
| - with tm.assert_produces_warning(FutureWarning) as m: |
277 |
| - from pandas.util.testing import assert_series_equal # noqa: F401 |
278 |
| - |
279 |
| - assert "pandas.util.testing is deprecated" in str(m[0].message) |
280 |
| - assert "pandas.testing instead" in str(m[0].message) |
281 |
| - |
282 | 260 | def test_util_in_top_level(self):
|
283 |
| - # in a subprocess to avoid import caching issues |
284 |
| - out = subprocess.check_output( |
285 |
| - [ |
286 |
| - sys.executable, |
287 |
| - "-c", |
288 |
| - "import pandas; pandas.util.testing.assert_series_equal", |
289 |
| - ], |
290 |
| - stderr=subprocess.STDOUT, |
291 |
| - ).decode() |
292 |
| - assert "pandas.util.testing is deprecated" in out |
293 |
| - |
294 | 261 | with pytest.raises(AttributeError, match="foo"):
|
295 | 262 | pd.util.foo
|
0 commit comments