Comment

Matheus Gaudencio

A BadAssError IS A TypeError and also IS A Exception. There is no problem there.

Your tests were probably using a parent to check against an exception instead of the specific type.

For instance, if you change foo() to raise TypeError, the first assertRaises will fail.