⬅︎ Back to Careful with your assertRaises() and inheritance of exceptions
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.
Comment
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.