From: Brandon Williams Date: Thu, 07 Dec 2017 19:40:47 GMT Subject: Re: [PATCH v6 03/12] fsck: support refs pointing to promisor objects Message-ID: <20171207194047.GD152943@google.com> In-Reply-To: <20171207112726.6486768718085a359bf8deca@google.com> On 12/07, Jonathan Tan wrote: > On Thu, 7 Dec 2017 11:18:52 -0800 > Brandon Williams wrote: > > > Instead of requiring that every test first removes 'repo', maybe you > > want to have each test do its own cleanup by adding in > > 'test_when_finished' lines to do the removals? Just a thought. > > If "test_when_finished" is the style that we plan to use in the project, > we can do that. > > But I think the "rm -rf" at the beginning of a test method is better > than "test_when_finished", though. It makes the test independent (for > example, the addition or removal of tests before such a test is less > likely to affect that test), and makes it clear if (and how) the test > does its own setup as opposed to requiring the setup from another test > block. You're right, at the end of the day you're just shuffling responsibility to of cleanup somewhere else. -- Brandon Williams