Yelp / Testify

A more pythonic testing framework.
Other
308 stars 67 forks source link

Specifying _suites in test class is not additive to base class's suites #200

Closed asottile closed 10 years ago

asottile commented 11 years ago

Here's a short contained example

# test1.py

import testify as T

@T.suite('suite_a')
class Test1(T.TestCase):
    def test_foo(self): pass

class Test2(Test1):
    _suites = ['suite_b']
    def test_bar(self): pass

Expected:

$ testify test1 --list-tests -x suite_a
$

Actual:

$ testify test1 --list-tests -x suite_a
test1 Test2.test_foo
test1 Test2.test_bar
$

Unfortunately I feel like this is going to involve metaclass magic to solve.