launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #07181
[Merge] lp:~jtv/maas/testcase-helpers into lp:maas
The proposal to merge lp:~jtv/maas/testcase-helpers into lp:maas has been updated.
Description changed to:
I raised this for discussion on IRC, but without success; the best way forward at this point is probably just to put it up for review.
This adds factory methods to create temporary files and directories. It's something I need for another branch I'm getting ready for review.
A temporary file is always created inside a temporary directory, so that there's just a single mechanism for cleanup. It also avoids the (almost entirely theoretical, but hey we're talking about deleting files here) hazard of a test deleting the file, and then somebody else creating another file with the same name just before the test goes through cleanup and accidentally deletes that new file.
More interestingly, some of the work is done in TestCase. The sole reason to do it that way is that it avoids the distraction of “self.useFixture(…),” and the extraction of the directory's path from the fixture, in tests. But I kept as much as I thought possible in the factory.
For more details, see:
https://code.launchpad.net/~jtv/maas/testcase-helpers/+merge/102835
--
https://code.launchpad.net/~jtv/maas/testcase-helpers/+merge/102835
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/maas/testcase-helpers into lp:maas.
References