def _should_fail(self, f):
    try:
        f(self.unit_test)
        self.fail(
            'AssertionError is expected to be raised, but none is raised')
    except __HOLE__ as e:
        # check if the detail is included in the error object
        self.assertIn('first error message:', str(e))
dataset/ETHPy150Open pfnet/chainer/tests/chainer_tests/testing_tests/test_condition.py/_should_fail