Overhaul the Attribute Selector plugin to fix the following bugs: Issue #412 : Attributes don't work on inherited test method Issue #411 : Plugin doesn't work on classes containing static methods Issue #324 : Mixing method and class attributes doesn't work Issue #381 : Plugin doesn't work on classes containing methods with no __dict__ (e.g., from boost.python) Issue #382 : Dupe of #381 with less info * When used as class decorator, attr() was only applying the attributes to methods with names starting with "test_". It would skip, e.g., my_cool_test. * The class decorator form of attr() did not work for test methods inherited from parent classes, nor were the attributes inherited by child classes. They also didn't work for methods added to the class later (e.g., by another decorator).
The primary changes are to use getattr/ setattr exlusively rather than direct access to __dict__ and to remove the (unneeded and problematic) wantClass method. Most of the bugs were caused by __dict__ access or wantClass not doing the right thing. In addition to fixing the above bugs, these changes make the plugin smaller and simpler to understand.
Add regression tests for fixed bugs.
Change assert not plug.wantFunction(h) to assert plug.wantFunction(h) is False where plug.wantFunction only return None or False
Refactor duplicated code in functional tests into base class.