Yelp/Testify — Issue #51: class_setup doesn't mix well
Author: blampe
Created: 2012-02-09 01:55:55+00:00
State: open

If an object that defines a `class_setup` method is mixed into several test classes (that don't inherit from one another), then some of those classes won't actually perform the setup.

Code to reproduce:

```python
import testify as T

class TestMixin(object):
@T.class_setup
def set_attr(cls):
cls.foo = True

def test_foo(self):
assert self.foo

class A(T.TestCase, TestMixin):
"""passes"""

class B(A):
"""passes"""

class C(T.TestCase, TestMixin):
""""fails"""

========================================================================
test C.test_foo
------------------------------------------------------------
Traceback (most recent call last):
File "./test.py", line 11, in test_foo
assert self.foo
AttributeError: 'C' object has no attribute 'foo'

========================================================================
```
`C` is expected to pass.