Yelp/Testify — Issue #31: catch def instead of class
Author: davidmarin
Created: 2011-10-31 22:37:34+00:00
State: open

A common mistake in writing test cases is to use `def` instead of class, something like this:

```python
def TestFoo(SomeSubclassOfTestCase):

test_something_really_important(test):
...
```

It seems like we could catch this by introspection; basically, we look for functions whose arguments have the same name as a subclass of `TestCase`, and issue a warning, something like:

```
foo_test.py:123 def TestFoo(...): use class, not def to define test cases
```