Code review comment for lp:~vila/bzr/321320-isolate-doc-tests

Revision history for this message
Andrew Bennetts (spiv) wrote :

17 + 'HOME': os.getcwd(),

There's a small behaviour difference here, although I think it's probably ok: this calculates the isolated $HOME once, at module import time, rather that during each test's setUp. Given that tests that care about this probably use TestCaseWithMemoryTransport, which explicitly overrides HOME appropriately, it's probably ok... I wonder a little about the effect on doctests that might be influenced by $HOME that can't use TestCaseWithMemoryTransport. In fact, isn't that what bug 312320 is about? Does this really allow bzrlib.branchbuilder's doctests to run in isolation from whatever the user has in their ~/.bazaar? I can't see how it does.

194 + doc_suite = DocTestSuite(
195 + mod, optionflags=doctest.REPORT_ONLY_FIRST_FAILURE)

That's a bit odd: shouldn't both DocTestSuite and REPORT_ONLY_FIRST_FAILURE be prefixed with “doctest.”, or neither of them?

240 + Since we use tests that are already isolated from os.environ abit of care

Typo: “a bit” is two words.

review: Needs Information

« Back to merge proposal