[MERGE] test framework distinguishes skips

Aaron Bentley aaron.bentley at utoronto.ca
Fri Jul 7 16:01:24 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> On  6 Jul 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:

>>But the exception does actually name the missing dependency, so it would
>>be possible to do @test_requires("paramiko").  Would you prefer that?
> 
> Or even just skip_on_exception(ParamikoNotPresent)?

I liked the fact that test_requires and dependency_failure gave the
rationale for skipping.  I think that skip_on_exception is too general.
 (Could be a platform, dependency or file format issue.)

I think I'll go ahead with @test_requires("paramiko"), etc.

> It'd be good to have 0 skips when running it on a typical developer's
> machine, where we can expect to have all the dependencies installed.
> Then if something does start to skip we can look into why.

+2

> However we may end up with disjoint sets of things which can only be
> tested on particular platforms.

We haven't hit that bridge so far - AFAIK, the whole suite can run on
Dapper.  But if we pull in Alexander's symlink support or hidden file
support, then we may have win32-specific functionality.

>>The two lsprof test cases each import lsprof to get their effect.  They
>>share a TestCase with many other tests, so if we're to do handle the
>>dependency in setUp, we should split the lsprof tests out into their own
>>TestCase.  Using the decorator on the tests seems simpler to me, but we
>>can do it that way if you want.
> 
> 
> I had in mind to split them out into a separate test case, but I didn't
> look very much at the overall context, so if you want to use the
> decoraotr that's OK with me.

If your way's relatively straightforward, I'll do that.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFErndE0F+nu1YWqI0RAocmAKCIDu6xoQGPiaiuhul9QZGOT0VyRACfW9+n
zkwSNUgadoLWPWbB+NC6qzY=
=17oj
-----END PGP SIGNATURE-----




More information about the bazaar mailing list