summaryrefslogtreecommitdiff
path: root/functional_tests
diff options
context:
space:
mode:
authorkumar <kumar.mcmillan@gmail.com>2011-03-19 00:28:06 -0500
committerkumar <kumar.mcmillan@gmail.com>2011-03-19 00:28:06 -0500
commitcb6181334bc230a5b888b7dafa44050b0a564cf6 (patch)
tree0e060a83370d39f8c363d811901fe7fdf8851f73 /functional_tests
parentbd1abc1316c853db60e82a202073a5e5ca266523 (diff)
downloadnose-cb6181334bc230a5b888b7dafa44050b0a564cf6.tar.gz
@attr can now be used as a class decorator (Issue 292)
Diffstat (limited to 'functional_tests')
-rw-r--r--functional_tests/support/att/test_attr.py12
-rw-r--r--functional_tests/test_attribute_plugin.py2
2 files changed, 14 insertions, 0 deletions
diff --git a/functional_tests/support/att/test_attr.py b/functional_tests/support/att/test_attr.py
index 20e1e49..f9b8ea5 100644
--- a/functional_tests/support/att/test_attr.py
+++ b/functional_tests/support/att/test_attr.py
@@ -1,3 +1,4 @@
+from nose.plugins.attrib import attr
import unittest
def test_one():
@@ -41,3 +42,14 @@ class Something(unittest.TestCase):
def test_case_three(self):
pass
+
+
+class TestAttrClass:
+
+ def test_one(self):
+ pass
+
+ def test_two(self):
+ pass
+
+TestAttrClass = attr('a')(TestAttrClass)
diff --git a/functional_tests/test_attribute_plugin.py b/functional_tests/test_attribute_plugin.py
index f62594e..d3bd779 100644
--- a/functional_tests/test_attribute_plugin.py
+++ b/functional_tests/test_attribute_plugin.py
@@ -28,6 +28,8 @@ class TestSimpleAttribute(PluginTester, unittest.TestCase):
assert 'test_case_two' not in self.output
assert 'test_case_one' not in self.output
assert 'test_case_three' not in self.output
+ assert 'TestAttrClass.test_one ... ok' in self.output
+ assert 'TestAttrClass.test_two ... ok' in self.output
class TestNotSimpleAttribute(PluginTester, unittest.TestCase):