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
To help to avoid bugs whereby an untrue and/or misleading exception message is raised due to some logical issue, such as #732, we should try to test not only that an exception is raised for some cf-python code but that it is the specific one that should be (e.g. ValueError and not just a general Exception) and that the specific error message is correct (bar details that will change which can be selectively ignored), via providing the appropriate string or regex to assertRaisesRegex.
There are (git grep "assertRaises" | wc -l =) 245 uses of assertRaises in the full test suite to test that some exception is raised when it should be, and I imagine most if not all of these can be upgraded in this sense.
To help to avoid bugs whereby an untrue and/or misleading exception message is raised due to some logical issue, such as #732, we should try to test not only that an exception is raised for some cf-python code but that it is the specific one that should be (e.g.
ValueError
and not just a generalException
) and that the specific error message is correct (bar details that will change which can be selectively ignored), via providing the appropriate string orregex
toassertRaisesRegex
.There are (
git grep "assertRaises" | wc -l
=) 245 uses ofassertRaises
in the full test suite to test that some exception is raised when it should be, and I imagine most if not all of these can be upgraded in this sense.See #732 (comment) for a small example I have included.
The text was updated successfully, but these errors were encountered: