Add test for dual class/factory inheritance.

If it works properly, this would make pylint happy.

Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>