Skip to content

CLN TST: Refactor Styler.bar tests through parametrisation #42472

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
merged 24 commits into from
Jul 12, 2021

Conversation

attack68
Copy link
Contributor

@attack68 attack68 commented Jul 9, 2021

Styler.bar tests are refactored to avoid code duplication and enhance the testing process to cover a wider array of scenarios with simpler code.

Summary of removed tests and their replacement coverage:

Original Test Replaced By Parameters
test_bar_align_left test_align_positive_cases
test_numerics
test_colors_mixed
align=left
test_bar_align_left_0points test_align_axis axis=[index,columns]
align=left
test_bar_align_mid_pos_and_neg test_align_mixed_cases
test_colors_mixed
align=mid
test_bar_align_mid_all_pos test_align_positive_cases align=mid
test_bar_align_mid_all_neg test_align_negative_cases align=mid
test_bar_align_zero_pos_and_neg test_align_mixed_cases
test_colors_mixed
align=zero
test_bar_align_left_axis_none test_align_axis align=left
axis=None
test_bar_align_zero_axis_none test_align_axis align=zero
axis=None
test_bar_align_mid_axis_none test_align_axis align=mid
axis=None

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

@mroeschke mroeschke added Styler conditional formatting using DataFrame.style Testing pandas testing functions or related to the test suite labels Jul 11, 2021
@mroeschke mroeschke added this to the 1.4 milestone Jul 11, 2021
@jreback jreback merged commit 9f55011 into pandas-dev:master Jul 12, 2021
@jreback
Copy link
Contributor

jreback commented Jul 12, 2021

thanks @attack68 always happy to take these

@attack68 attack68 deleted the styler_bar_tests_improve branch July 12, 2021 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants