[TIP] Unittest Changes
fuzzyman at voidspace.org.uk
Mon Jul 21 05:29:29 PDT 2008
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>> Any other good ideas about ways that unittest could change that don't
>> either grow the API greatly or break backwards compatibility?
> Take a look at twisted's trial. They got two things I miss in unittest:
> - - the ability to only run a subset of tests based on path
> trial module.tests
> trial module.tests.test_module.TestSomeClass.testMethod
We use something similar at work. It is very useful to be able to run a
single test so I will add that to my list of changes.
> - - assertIsInstance(var, Class) is also a very useful addition.
There is some resistance to widening the API of unittest (which already
has a myriad of 'assert*' methods) with new ones that can be written in
only a line or two.
It probably means that my beloved assertIn, assertNotIn won't getIn -
but such is life. I'll add it to the list, I think the changes will need
a PEP anyway and we'll see what gets through.
> kind regards,
>> Michael Foord
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> -----END PGP SIGNATURE-----
More information about the testing-in-python