def test_Diff_Exception(self):
    basetest._WriteTestData(b'01: text A\n02: text B\n03: C', self.data1_file)
    basetest._WriteTestData(b'01: text A\n02: zzzzzz\n03: C', self.data2_file)

    with self.assertRaises(basetest.OutputDifferedError) as error_context:
      basetest._Diff(self.data1_file, self.data2_file)

    # Check that both filenames and some semblance of a unified diff
    # are present in the exception error message.
    diff_error_message = str(error_context.exception)
    self.assertIn('provided_1', diff_error_message)
    self.assertIn('provided_2', diff_error_message)
    self.assertIn('@@', diff_error_message)
    self.assertIn('02: text B', diff_error_message)
Test that _Diff includes the delta in the error msg.
dataset/ETHPy150Open google/google-apputils/tests/basetest_test.py/GoogleTestBaseUnitTest.test_Diff_Exception