GitHyperBlameMainTest.testBadFilename: Work around git-blame bug.

A regression in git-blame prints an incorrect error message which causes
this test case to fail. Alter the test to only check the start of the
string, until the bug is fixed upstream.

Bug: 737688
Change-Id: I4045cb8792d8abe984215c7198e213b23e9f6f5d
Reviewed-on: https://chromium-review.googlesource.com/567778
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
changes/78/567778/2
Matt Giuca 8 years ago committed by Commit Bot
parent 4e5207d6f0
commit 6bac8a8499

@ -132,8 +132,12 @@ class GitHyperBlameMainTest(GitHyperBlameTestBase):
stdout=stdout, stderr=stderr)
self.assertNotEqual(0, retval)
self.assertEqual('', stdout.getvalue())
self.assertEqual('fatal: no such path some/files/xxxx in %s\n' %
self.repo['C'], stderr.getvalue())
# TODO(mgiuca): This test used to test the exact string, but it broke due to
# an upstream bug in git-blame. For now, just check the start of the string.
# A patch has been sent upstream; when it rolls out we can revert back to
# the original test logic.
self.assertTrue(
stderr.getvalue().startswith('fatal: no such path some/files/xxxx in '))
def testBadRevision(self):
"""Tests the main function (bad revision to blame from)."""

Loading…
Cancel
Save