Skip to content

TST: Fix duplicate file usage when running in parallel. #11973

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
Aug 29, 2018

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Aug 29, 2018

PR Summary

If the same filename is used for two tests in the same file, there's a
possibility that one might overwrite the other when testing in parallel.

PR Checklist

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

If the same filename is used for two tests in the same file, there's a
possibility that one might overwrite the other when testing in parallel.
@QuLogic QuLogic added this to the v2.2.4 milestone Aug 29, 2018
@tacaswell
Copy link
Member

Do we de-duplicate the names when saving them out?

@QuLogic
Copy link
Member Author

QuLogic commented Aug 29, 2018

No, there's no de-duplication because then you would lose a test result. But images are saved and compared sequentially, so duplicate names in a single test are safe. (I believe I did originally attempt to parametrize baseline_images, but it ran into exactly this issue on other tests.)

@tacaswell tacaswell merged commit 98c172b into matplotlib:master Aug 29, 2018
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Aug 29, 2018
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Aug 29, 2018
@QuLogic QuLogic deleted the dedup-image-names branch August 29, 2018 23:32
tacaswell added a commit that referenced this pull request Aug 30, 2018
tacaswell added a commit that referenced this pull request Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants