Commit 99785047 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[trac955] added some descriptive comments to __match_exception()

parent 6135be82
......@@ -209,6 +209,10 @@ class TestXfrinConnection(unittest.TestCase):
return mock_ctx
def __match_exception(self, expected_exception, expected_msg, expression):
# This helper method is a higher-granularity version of assertRaises().
# If it's not sufficient to check the exception class (e.g., when
# the same type of exceptions can be thrown from many places), this
# method can be used to check it with the exception argument.
except expected_exception as ex:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment