-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Remove temp build dir even if the req is not installed (fixes #420) #599
Conversation
This is normally done by TestFileEnvironment if the `start_clear` parameter is True, but TestPipEnvironment and FastTestPipEnvironment explicitly set it to False.
Note that the travisbot failure above seems unrelated to the changes in this pull request. It seems like an infrastructure failure. Can you try to build this pull request again? |
Just to reinforce what @claymation says I got it from travis-ci:
|
I think @pnasrat is the admin on our travis account, but I've seen other people make a trivial change (like change a commit timestamp or a commit comment), and then force push to re-trigger a build when it's obviously not the pull request's fault. |
|
||
TestFileEnvironment provides a mechanism to ensure that | ||
no temporary files are left after a test script executes, | ||
so we can take advantage of that here by simply running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be helpful to mention that the mechanism is that ProcResult.assert_no_temp
gets called and throws an exception if the tmp is non-empty.
that will make people feel better that this test can actually fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, sure, feel free to add the gory details if you'd like :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the point is to be clear that the "mechanism" can actually cause a test failure, since you're not doing an explicit assert.
Thanks, I'll force push to trigger a build. |
I want to merge this in, but I'm heading on a trip. I'll get back to this next week, unless somebody else merges first. I do want to fix that test. |
btw, I did also manually verify the "pip-random-build" temp dirs are getting cleaned up in this branch for the scenario mentioned in #420. |
This change ensures that
RequirementSet.cleanup_files()
is called wheneverreq_to_install._temp_build_dir
is defined, preventing detritus from accumulating in$TMPDIR
.