/usr/local/lib64/python3.6/site-packages/pandas/tests/util
NameSizeModeActions
__pycache__/-0755rm
conftest.py4760644editdlrm
test_assert_almost_equal.py114990644editdlrm
test_assert_categorical_equal.py27490644editdlrm
test_assert_extension_array_equal.py34710644editdlrm
test_assert_frame_equal.py88350644editdlrm
test_assert_index_equal.py56640644editdlrm
test_assert_interval_array_equal.py23640644editdlrm
test_assert_numpy_array_equal.py63610644editdlrm
test_assert_produces_warning.py5470644editdlrm
test_assert_series_equal.py90890644editdlrm
test_deprecate.py16260644editdlrm
test_deprecate_kwarg.py20430644editdlrm
test_deprecate_nonkeyword_arguments.py27130644editdlrm
test_doc.py14920644editdlrm
test_hashing.py108600644editdlrm
test_numba.py3080644editdlrm
test_safe_import.py10200644editdlrm
test_show_versions.py11870644editdlrm
test_util.py19820644editdlrm
test_validate_args.py18440644editdlrm
test_validate_args_and_kwargs.py23910644editdlrm
test_validate_kwargs.py17400644editdlrm
__init__.py00644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/pandas/tests/util/test_deprecate.py (1626B)
from textwrap import dedent import pytest from pandas.util._decorators import deprecate import pandas._testing as tm def new_func(): """ This is the summary. The deprecate directive goes next. This is the extended summary. The deprecate directive goes before this. """ return "new_func called" def new_func_no_docstring(): return "new_func_no_docstring called" def new_func_wrong_docstring(): """Summary should be in the next line.""" return "new_func_wrong_docstring called" def new_func_with_deprecation(): """ This is the summary. The deprecate directive goes next. .. deprecated:: 1.0 Use new_func instead. This is the extended summary. The deprecate directive goes before this. """ pass def test_deprecate_ok(): depr_func = deprecate("depr_func", new_func, "1.0", msg="Use new_func instead.") with tm.assert_produces_warning(FutureWarning): result = depr_func() assert result == "new_func called" assert depr_func.__doc__ == dedent(new_func_with_deprecation.__doc__) def test_deprecate_no_docstring(): depr_func = deprecate( "depr_func", new_func_no_docstring, "1.0", msg="Use new_func instead." ) with tm.assert_produces_warning(FutureWarning): result = depr_func() assert result == "new_func_no_docstring called" def test_deprecate_wrong_docstring(): msg = "deprecate needs a correctly formatted docstring" with pytest.raises(AssertionError, match=msg): deprecate( "depr_func", new_func_wrong_docstring, "1.0", msg="Use new_func instead." )