python-needle / needle

Automated tests for your CSS.
https://needle.readthedocs.io/
Other
590 stars 50 forks source link

Fix race condition in creating baseline and output directories #57

Closed jzoldak closed 7 years ago

jzoldak commented 7 years ago

We have hit this race condition when running our tests multithreaded, because in our case the tests have the same baseline and output directories defined, and those directories do not yet exist.

jphalip commented 7 years ago

This looks great, thanks. Could you please just add a comment in the code explaining that the used approach is specifically to avoid race conditions? Otherwise the code might look overly complicated without more context on the issue.

jzoldak commented 7 years ago

Hey @jphalip thanks for looking at my PR so quickly. I added the comment. Hope that explanation is clear.

jphalip commented 7 years ago

Great, thank you!

jzoldak commented 7 years ago

@jphalip Thanks again for reviewing and merging in my change, and especially for creating and sharing this library. 😍 Any chance you would be able to create a new release so we can install these changes from pypi?

jphalip commented 7 years ago

@jzoldak Sure, I've just pushed 0.4.1

jzoldak commented 7 years ago

@jphalip awesome, thx.