[TIP] unittest.TestCase and tags
mateusz at loskot.net
Fri Apr 18 15:33:30 PDT 2014
n 18 April 2014 21:12, Albert-Jan Roskam <fomcl at yahoo.com> wrote:
>> I have a collection of integration tests based on the unittest package.
>> I'd like to be able to categorise tests, so I can select what kind of tests
>> I want to run. For example, tests reaching local filesystem,
>> tests relying on remote database servers, and so on.
> from nose.plugins.attrib import attr
> import unittest
> class Test(unittest.TestCase):
> def test_blah(self):
> then select the attribute:
> $ nosetests -a database
> Thanks, didn't know about this ;-)
I thank you Sir! :)
I go nose, loving it.
Mateusz Łoskot, http://mateusz.loskot.net
More information about the testing-in-python