<div class="gmail_extra">You could also create a TestCase inheritance structure like this:</div><div class="gmail_extra"><br></div><div class="gmail_extra">class TestCaseGeneric(TestCase)</div><div class="gmail_extra"> "provide virtual methods for interacting with the interface."</div>
<div class="gmail_extra"><div class="gmail_extra">class TestCaseInterface1(TestCaseVirtual)</div><div class="gmail_extra"> "provide real methods for interacting with the interface, and real tests."</div><div>
<div class="gmail_extra">class TestCaseInterface2(TestCaseInterface1)</div><div class="gmail_extra"> "provide real methods for interacting with the interface, uses tests from TestCaseInterface1."</div></div>
<div>
<div class="gmail_extra"><br></div></div><div class="gmail_extra">This would achieve the same result as use of your @onlyinsubclass decorator. Granted, this breaks the SRP (<a href="http://en.wikipedia.org/wiki/Single_responsibility_principle">http://en.wikipedia.org/wiki/Single_responsibility_principle</a>), but it removes the dependence of your test on an outside module, which is a Good Thing.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">-Dan W.</div></div>