nose-devs/nose — Issue #104: Base Test Case's attributes not acknowledged by the -a flag
Author: jpellerin
Created: 2011-12-14 15:59:21+00:00
State: open

What steps will reproduce the problem?
1. Create a class:
BaseTestCase(object):
test_attr = True
2. Create a test case:
MyTestCase(BaseTestCase, unittest.TestCase):
def test_me(self):
pass
3. Collect tests with the "test_attr":
nosetests -a test_attr --collect

What is the expected output?
One test should be found as valid

What do you see instead?
No tests are collected

What version of the product are you using? On what operating system?
0.11.1

Please provide any additional information below.
This issue was brought up on StackOverflow
(http://stackoverflow.com/questions/1188922/how-can-i-get-nosea-to-find-
class-attributes-defined-on-a-base-test-class)

I've attached the suggested patch (with some alterations for non-"new
style" objects.

Google Code Info:
Issue #: 307
Author: jgee...@gmail.com
Created On: 2009-11-12T19:29:22.000Z
Closed On: