コード例 #1
0
 def test_func(self):
     with asserts.assert_raises_regex(
             SomeError,
             expected_regex=MSG_EXPECTED_EXCEPTION,
             extras=MOCK_EXTRA):
         raise AttributeError(MSG_UNEXPECTED_EXCEPTION)
コード例 #2
0
 def test_func(self):
     with asserts.assert_raises_regex(
             SomeError,
             expected_regex=MSG_EXPECTED_EXCEPTION,
             extras=MOCK_EXTRA):
         raise SomeError(wrong_msg)