@jreback FYI: this format isn't Python 3 compatible, better to use `except Exception as detail` and frankly you could collapse all of these lines into:

```python
assertRaisesRegexp(TypeError, "incompatible index of inserted column with frame index", df.__setitem__, 'gr', df.groupby(['b', 'c']).count())
```
or 

```python
def testit(): df['gr'] = df.groupby(['b', 'c']).count()
assertRaisesRegexp(TypeError, "incompatible index of inserted column with frame index", testit)
```