[MERGE][1.2?][Bug #137823] Don't blindly raise UnavailableFeature during test setup

Robert Collins robertc at robertcollins.net
Sun Feb 10 22:54:30 GMT 2008


On Sun, 2008-02-10 at 23:49 +0100, Vincent Ladeuil wrote:
> >>>>> "john" == John Arbash Meinel <john at arbash-meinel.com> writes:
> 
>     john> Vincent Ladeuil wrote:
>     >> Hi,
>     >> 
>     >> This bug was nasty, see details on https://bugs.edge.launchpad.net/bzr/+bug/137823
>     >> 
>     >> The risk of broking anything is sufficiently low that this may be
>     >> included in 1.2 if time permits.
>     >> 
>     >> Also note that this was caused by an unusual way to check the
>     >> availability of the feature, it needed to be done in
>     >> transport.ftp.get_test_permutations() with no access to the test
>     >> itself (hence no access to neither _test_needs_features nor
>     >> requireFeature()).
>     >> 
>     >> Vincent
> 
>     john> Why not change it so that raising an exception during
>     john> setUp still calls tearDown?
> 
> You mean change the way a test is run ?
> 
> Because:
> 
> 1) unittest.TestCase.run don't do it, and I'll wait to have some
>    more years of TDD experience before going against such a
>    decision ;-)
> 
> 2) It was easier that way :)
> 
> 3) I wanted to address that bug only.

4) teardown's are nearly all written on the assumption that setup
completed correctly.

We'll break compatibility with pyunittest most definitely to change this
IMO.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080211/8bba1fe4/attachment.pgp 


More information about the bazaar mailing list