Skip to content

CLN: Consistent pandas.util.testing imports in pandas/tests/frame - part 4 #29303

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
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
9 changes: 4 additions & 5 deletions pandas/tests/frame/test_sort_values_level_as_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from pandas.errors import PerformanceWarning

from pandas import DataFrame
from pandas.util import testing as tm
from pandas.util.testing import assert_frame_equal
import pandas.util.testing as tm


@pytest.fixture
Expand Down Expand Up @@ -62,7 +61,7 @@ def test_sort_index_level_and_column_label(df_none, df_idx, sort_names, ascendin
# Compute result sorting on mix on columns and index levels
result = df_idx.sort_values(by=sort_names, ascending=ascending, axis=0)

assert_frame_equal(result, expected)
tm.assert_frame_equal(result, expected)


def test_sort_column_level_and_index_label(df_none, df_idx, sort_names, ascending):
Expand All @@ -88,6 +87,6 @@ def test_sort_column_level_and_index_label(df_none, df_idx, sort_names, ascendin
# Accessing multi-level columns that are not lexsorted raises a
# performance warning
with tm.assert_produces_warning(PerformanceWarning, check_stacklevel=False):
assert_frame_equal(result, expected)
tm.assert_frame_equal(result, expected)
else:
assert_frame_equal(result, expected)
tm.assert_frame_equal(result, expected)
Loading