Skip to content

Disable cache in non-incremental tests #3255

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
Apr 26, 2017
Merged

Conversation

gvanrossum
Copy link
Member

Fixes #3253

@gvanrossum
Copy link
Member Author

Before, pytest took a minute, now it takes 45 sec.

@gvanrossum
Copy link
Member Author

Another solution might be to set self.cache_dir to os.devnull (or '') in options.py and to change the default to defaults.CACHE_DIR only in main(). Then all tests that bypass main() and instead use build.build() will skip writing the cache, but "real" usage will still write the cache.

@JukkaL
Copy link
Collaborator

JukkaL commented Apr 26, 2017

We should also disable writing the cache for fine-grained incremental checking test cases (diff.test, fine-grained.test, deps.test and merge.test).

@gvanrossum
Copy link
Member Author

OK, how about now?

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

LGTM

@JukkaL JukkaL merged commit 84ebd45 into master Apr 26, 2017
@gvanrossum gvanrossum deleted the no-cache-write-in-tests branch April 28, 2017 00:17
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