Skip to content

Conversation

@attack68
Copy link
Contributor

  • add pytest.fixture instead of Class setup method
  • no test removed or added, just amended to accept new fixtures

@attack68 attack68 added Clean Styler conditional formatting using DataFrame.style Testing pandas testing functions or related to the test suite labels Mar 21, 2021
def test_highlight_null_subset(s):
# GH 31345
result = (
s.highlight_null(null_color="red", subset=["A"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can you line these up on the periods

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

black does the aligning here, not me.

result = getattr(df.style, f)(axis=1, color="red")._compute().ctx
assert result == expected
@pytest.fixture
def s(df):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you call this maybe styler, s is too short

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jreback jreback added this to the 1.3 milestone Mar 23, 2021
@jreback jreback merged commit c4b8624 into pandas-dev:master Mar 23, 2021
@jreback
Copy link
Contributor

jreback commented Mar 23, 2021

thanks @attack68

@attack68 attack68 deleted the test_highlight_no_class_format branch March 23, 2021 16:24
vladu pushed a commit to vladu/pandas that referenced this pull request Apr 5, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Styler conditional formatting using DataFrame.style Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants