On Friday 12 February 2016 17:13:17 Richard W.M. Jones wrote:
On Fri, Feb 12, 2016 at 06:04:47PM +0100, Pino Toscano wrote:
> - use assertIsInstance, assertNotEqual, and assertIsNotNone as more
> specific checks (will produce better logging)
> - use assertRaises when expecting exceptions being thrown
> - when testing internal_test_rhashtable, instead of checking type and
> elements of the return values just check the return value as a whole
> (easier and already getting all the work needed by unittest)
Good find! I was going by the documentation which didn't mention any
of these asserts.
Hm I see all of them in
https://docs.python.org/2.7/library/unittest.html#test-cases
ACK, assuming it also works with python3, ie this passes:
PYTHON=/usr/bin/python3 ./configure && make && make -C test-data check
&& make -C python check
Usually I try on a Python3-only distribution (== Archlinux). Since
they passed there too, I pushed it.
Thanks,
--
Pino Toscano