Skip to content

cacheprovider: do not write README/.gitignore to existing dir #4394

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 2 commits into from
Nov 23, 2018

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Nov 14, 2018

Fixes #4393.

It will not "upgrade" existing dirs anymore - not sure if we want to keep this behavior?!
Could be achieved with more logic, but certainly cache_dir = . should be skipped etc.

cache = Cache.for_config(config)
cache.set("foo", "bar")

assert os.path.isdir("v") # cache contents
Copy link
Member

Choose a reason for hiding this comment

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

Added this to ensure . is the actual cache dir (just to be safe).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Great @blueyed, thanks!

@nicoddemus nicoddemus merged commit e4ae33d into pytest-dev:master Nov 23, 2018
@nicoddemus
Copy link
Member

🙇

@blueyed blueyed deleted the cache-ensure-files branch April 7, 2019 23:12
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.

2 participants