[TIP] Is it possible to use attrib plugin for nosetests as a context sensitive plugin

Kamal Ahmed kamal2222ahmed at yahoo.com
Sun Jun 12 21:20:24 PDT 2011


e.g.

from nose.plugins.attrib import attr

@attr('mysql')
def testme1():
pass
@attr('mysql')
def testme2():
pass

@attr('psql')
def testme3():
pass

def testme4():
pass

@attr('none')
def testme5():
pass



nosetests -a '!psql'
would run the tests with attrib('!mysql')
instead of not running 3 tests that match !mysql , run the other 2 tests which have attrib @attr('mysql') with attrib('psql')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20110612/3e0212d5/attachment.htm>


More information about the testing-in-python mailing list