diff options
Diffstat (limited to 'unit_tests')
-rw-r--r-- | unit_tests/test_attribute_plugin.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/unit_tests/test_attribute_plugin.py b/unit_tests/test_attribute_plugin.py index f9214f9..0df0e99 100644 --- a/unit_tests/test_attribute_plugin.py +++ b/unit_tests/test_attribute_plugin.py @@ -1,4 +1,4 @@ - +# There are more attribute plugin unit tests in unit_tests/test_plugins.py from nose.tools import eq_ from nose.plugins.attrib import attr @@ -31,6 +31,7 @@ def test_mixed(): eq_(test.role, 'integration') def test_class_attrs(): + # @attr('slow', 'net', role='integration') class MyTest: def setUp(): pass @@ -39,11 +40,14 @@ def test_class_attrs(): def test_two(self): pass + class SubClass(MyTest): + pass + MyTest = attr('slow', 'net', role='integration')(MyTest) - for n in ('test_one', 'test_two'): - eq_(getattr(MyTest, n).slow, 1) - eq_(getattr(MyTest, n).net, 1) - eq_(getattr(MyTest, n).slow, 1) + eq_(MyTest.slow, 1) + eq_(MyTest.net, 1) + eq_(MyTest.role, 'integration') + eq_(SubClass.slow, 1) assert not hasattr(MyTest.setUp, 'slow') -
\ No newline at end of file + assert not hasattr(MyTest.test_two, 'slow') |