[Cubicweb] pytest monkey-patching gets in the way

Christophe de Vienne christophe at unlish.com
Tue Nov 18 12:41:54 CET 2014

Hi everyone,

logilab.common.pytest does a bad thing by monkey-patching unittest.

It makes it impossible to use alternate test runners for cubicweb tests.

The following code allowed me to use py.test or nose to run some of my 

    import unittest
    save_testrunner = unittest.TextTestRunner

    import logilab.common.pytest # noqa
    unittest.TextTestRunner = save_testrunner

This makes me think that undoing this permanently in 
logilab.common.pytest should not be such a big deal.
Has anyone tried to do that already ?

I would like the relevant ticket (https://www.logilab.org/ticket/92013) 
to become higher priority. Could it be a subject for, say, a vsprint ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20141118/3dfdbf4b/attachment-0185.html>

More information about the Cubicweb mailing list