Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cleanup testing.compare. #16602

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 1 commit into from
Feb 29, 2020
Merged

Cleanup testing.compare. #16602

merged 1 commit into from
Feb 29, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 28, 2020

  • In get_cache_dir(), we can assume that get_cachedir always returns a
    writable directory (we make the same assumption e.g. in texmanager,
    for example), basically since 244e8d8.
  • pathlibify convert().

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

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

conditional on CI

cached_path = cache_dir / (hash_value + newpath.suffix)
if cached_path.exists():
shutil.copyfile(cached_path, newpath)
return newpath
Copy link
Member

Choose a reason for hiding this comment

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

This is returning a Path but l.283 is returning a str. Have you forgotten to str this as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, fixed

- In get_cache_dir(), we can assume that get_cachedir always returns a
  writable directory (we make the same assumption e.g. in texmanager,
  for example), basically since 244e8d8.
- pathlibify convert().
@timhoffm timhoffm merged commit 9cd240a into matplotlib:master Feb 29, 2020
@anntzer anntzer deleted the compare branch February 29, 2020 09:35
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.

3 participants