EastAgile / robber.py

BDD / TDD assertion library for Python
MIT License
8 stars 1 forks source link

Match exception exactly #9

Closed hieueastagile closed 7 years ago

hieueastagile commented 7 years ago

Meanwhile, we are checking exception by using isinstance function, that means if we have ParentException and ChildExcetion, then if callable trigger ChildException, then

expect(callable).to.throw(ParentException) 

would be ok too.

In some case, we might want to check exactly the exception which was raised, so, we might want

expect(callable).to.throw.exactly(ChildException)
hieueastagile commented 7 years ago

We might need to resolve this first: https://github.com/EastAgile/robber.py/issues/4

catriuspham commented 7 years ago

@oyster Please close this issue too, thanks.