diff options
author | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2010-06-11 15:11:47 +0200 |
---|---|---|
committer | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2010-06-11 15:11:47 +0200 |
commit | 9920b06f8c5019ff8806a12ed3d89b7a65fab299 (patch) | |
tree | fca812236762707f202780e39da2bbf3609190fa /test | |
parent | bce9037d1d3f8852534b373954c0906c87d33b8c (diff) | |
download | logilab-common-9920b06f8c5019ff8806a12ed3d89b7a65fab299.tar.gz |
[testlib/tag] Tagged method now inherit from class Tags too.
This behaviour might be controlled with the ``inherit`` argument of the ``tag``
decorator and ``Tags`` constructor.
The ``Tags`` constructors now have the same signature than the ``tag`` decorator. The
former signature (same as ``set`` constructor) is still supported.
Diffstat (limited to 'test')
-rw-r--r-- | test/unittest_testlib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unittest_testlib.py b/test/unittest_testlib.py index 74a8c10..fff864b 100644 --- a/test/unittest_testlib.py +++ b/test/unittest_testlib.py @@ -870,7 +870,7 @@ class TagTC(TestCase): self.func = bob class TagTestTC(TestCase): - tags = Tags(('one', 'two')) + tags = Tags('one', 'two') def test_one(self): self.assertTrue(True) @@ -879,7 +879,7 @@ class TagTC(TestCase): def test_two(self): self.assertTrue(True) - @tag('three') + @tag('three', inherit=False) def test_three(self): self.assertTrue(True) self.cls = TagTestTC @@ -927,7 +927,7 @@ class TagTC(TestCase): runner = SkipAwareTextTestRunner(options=options('one')) self.assertTrue(runner.does_match_tags(cls.test_one)) - self.assertFalse(runner.does_match_tags(cls.test_two)) + self.assertTrue(runner.does_match_tags(cls.test_two)) self.assertFalse(runner.does_match_tags(cls.test_three)) runner = SkipAwareTextTestRunner(options=options('two')) |