| Index: tests/owners_unittest.py
|
| diff --git a/tests/owners_unittest.py b/tests/owners_unittest.py
|
| index e031ab87b92290a47f18123fd2bb3b8378b4e3f0..34272a1337da077c57ab3ff285f7e219b4ab572b 100755
|
| --- a/tests/owners_unittest.py
|
| +++ b/tests/owners_unittest.py
|
| @@ -234,34 +234,39 @@ class OwnersDatabaseTest(unittest.TestCase):
|
|
|
| def test_reviewers_for__one_owner(self):
|
| self.assert_reviewers_for([
|
| - '/chrome/gpu/gpu_channel.h',
|
| - '/content/baz/froboz.h',
|
| - '/chrome/renderer/gpu/gpu_channel_host.h'], [brett])
|
| + 'chrome/gpu/gpu_channel.h',
|
| + 'content/baz/froboz.h',
|
| + 'chrome/renderer/gpu/gpu_channel_host.h'], [brett])
|
|
|
| def test_reviewers_for__two_owners(self):
|
| self.assert_reviewers_for([
|
| - '/chrome/gpu/gpu_channel.h',
|
| - '/content/content.gyp',
|
| - '/content/baz/froboz.h',
|
| - '/content/views/pie.h'
|
| + 'chrome/gpu/gpu_channel.h',
|
| + 'content/content.gyp',
|
| + 'content/baz/froboz.h',
|
| + 'content/views/pie.h'
|
| ], [john, brett])
|
|
|
| def test_reviewers_for__all_files(self):
|
| self.assert_reviewers_for([
|
| - '/chrome/gpu/gpu_channel.h',
|
| - '/chrome/renderer/gpu/gpu_channel_host.h',
|
| - '/chrome/renderer/safe_browsing/scorer.h',
|
| - '/content/content.gyp',
|
| - '/content/bar/foo.cc',
|
| - '/content/baz/froboz.h',
|
| - '/content/views/pie.h'], [john, brett])
|
| + 'chrome/gpu/gpu_channel.h',
|
| + 'chrome/renderer/gpu/gpu_channel_host.h',
|
| + 'chrome/renderer/safe_browsing/scorer.h',
|
| + 'content/content.gyp',
|
| + 'content/bar/foo.cc',
|
| + 'content/baz/froboz.h',
|
| + 'content/views/pie.h'], [john, brett])
|
| +
|
| + def test_reviewers_for__per_file_owners_file(self):
|
| + self.files['/content/baz/OWNERS'] = owners_file(lines=[
|
| + 'per-file ugly.*=tom@example.com'])
|
| + self.assert_reviewers_for(['content/baz/OWNERS'], [darin])
|
|
|
| def assert_syntax_error(self, owners_file_contents):
|
| db = self.db()
|
| self.files['/foo/OWNERS'] = owners_file_contents
|
| self.files['/foo/DEPS'] = ''
|
| try:
|
| - db.reviewers_for(['/foo/DEPS'])
|
| + db.reviewers_for(['foo/DEPS'])
|
| self.fail() # pragma: no cover
|
| except owners.SyntaxErrorInOwnersFile, e:
|
| self.assertTrue(str(e).startswith('/foo/OWNERS:1'))
|
|
|