You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This masking made perfect sense when assertRaises was awkward to use in the pre-2.7 days, but with unittest.TestCase.assertRaises() now able to be used a context manager if you want to perform multiple steps, and testtools.TestCase.assertRaises() alway expects one callable function with arguments.
I'm not sure of a good solution here.
The text was updated successfully, but these errors were encountered:
Just to add, I found that this masking also breaks compatibility when asserRaises() is used as a context manager. In which case it will complain about a missing callableObject.
Changing this would be an API break, so perhaps get a few such things together and rip the bandaid off, if going to do it, but that said I suspect that some clever code might allow for assertRaises to be used as a context manager too.
However, personally, I prefer the raises matcher family.
This masking made perfect sense when assertRaises was awkward to use in the pre-2.7 days, but with unittest.TestCase.assertRaises() now able to be used a context manager if you want to perform multiple steps, and testtools.TestCase.assertRaises() alway expects one callable function with arguments.
I'm not sure of a good solution here.
The text was updated successfully, but these errors were encountered: