[MERGE][bug #125784] Don't suppress original errors when .unlock() fails
John Arbash Meinel
john at arbash-meinel.com
Mon Jun 16 17:14:00 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
| Martin Pool has voted tweak.
| Status is now: Conditionally approved
| Comment:
| + except:
| + import sys
|
| You already imported 'sys' at the top level; it's certainly already in
| memory.
No, because this is in a string that is being compiled. Don't ask me why, but
without this, it borks. Though I might have copied that to one of the locations
that wouldn't have borked. I do know that I needed to add 'import sys' for the
"pretty" functions.
|
| As we mentioned in the bug it might have been nice to log or tell the
| user about any errors occurring while unlocking.
|
| +class TestFastDecoratorActions(TestDecoratorActions):
| +
| + _decorator_style = 'fast'
| +
| +
| +class TestPrettyDecoratorActions(TestDecoratorActions):
| +
| + _decorator_style = 'pretty'
|
| (comment) I would kind of like if these could be written using the
| scenario multiplier code rather than subclassing, so that we can move
| towards consistently using that. But I guess it can wait until someone
| goes to update all of them; it's not particularly cumbersome like this.
|
It is quite a bit more effort to multiply rather than subclass. Because the
multiplier is designed for adapting all tests in a module, so adapting just 1
class XX is kind of hard. 'load_tests' would let you do it, but you have to
'iter_suite_tests(basic_tests)' and then figure out which ones need to be adapted.
Or have them in a separate module, and adapt everything, etc.
I'm not saying I wouldn't do it if pushed, just that in this case it would be a
lot more effort.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhWkUgACgkQJdeBCYSNAAOAuACbBQlquMHE/nqx1LDqUPbZJvmo
ElQAn1thBiT47kcHU8X6djWO++MDTNN7
=TBzj
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list