Skip to content
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

Rewrite test_cycles to avoid image comparison tests. #15900

Merged
merged 1 commit into from Dec 13, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 10, 2019

They can all be reasonably written by checking the artist properties.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

lib/matplotlib/tests/test_cycles.py Show resolved Hide resolved


@image_comparison(['fill_cycle_basic.png'], remove_text=True)
for _ in range(4):
Copy link
Member

Choose a reason for hiding this comment

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

this could probably be a test fixture given it's the same for all of these (and I know, for two lines it might not be worth it)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure fixturizing two lines really helps readability...

Copy link
Member

Choose a reason for hiding this comment

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

I'm thinking more about the code repetition, but 🤷‍♀ am +-0 on it.

They can all be reasonably written by checking the artist properties.
@jklymak
Copy link
Member

jklymak commented Dec 13, 2019

Do we know why codecov dropped?

@anntzer
Copy link
Contributor Author

anntzer commented Dec 13, 2019

Some lines are marked in yellow in https://codecov.io/gh/matplotlib/matplotlib/compare/c265d5a11b2e03b29ec11ffa437a1fc9a7a4377b...6a1a07ed093bf53af55b0166cc6496e82b81d3f8/diff, even though they have clearly been executed (they are surrounded by green lines). See also https://community.codecov.io/t/trouble-understanding-why-some-non-branch-lines-are-yellow-in-review/230, which seems similar...

@jklymak jklymak added this to the v3.3.0 milestone Dec 13, 2019
@jklymak jklymak merged commit 9344cb4 into matplotlib:master Dec 13, 2019
@anntzer anntzer deleted the test_cycles branch December 13, 2019 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants