mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
show-scope is only available git>=2.26
Change-Id: Ie83edb34f2e582ccca177e36010344788a090376 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5874040 Reviewed-by: Josip Sokcevic <sokcevic@chromium.org> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
committed by
LUCI CQ
parent
4d24c262e7
commit
d1259b49c5
@@ -514,6 +514,35 @@ class GitConfigStateTestTest(unittest.TestCase):
|
||||
},
|
||||
})
|
||||
|
||||
@mock.patch('git_common.get_git_version')
|
||||
@mock.patch('scm.GIT.Capture')
|
||||
def test_load_config_git_version_2_old(self, mock_capture,
|
||||
mock_get_git_version):
|
||||
mock_get_git_version.return_value = (2, 25)
|
||||
mock_capture.return_value = ""
|
||||
|
||||
config_state = scm.GitConfigStateReal("/fake/path")
|
||||
config_state.load_config()
|
||||
|
||||
mock_capture.assert_called_once_with(['config', '--list', '-z'],
|
||||
cwd=config_state.root,
|
||||
strip_out=False)
|
||||
|
||||
@mock.patch('git_common.get_git_version')
|
||||
@mock.patch('scm.GIT.Capture')
|
||||
def test_load_config_git_version_new(self, mock_capture,
|
||||
mock_get_git_version):
|
||||
mock_get_git_version.return_value = (2, 26)
|
||||
mock_capture.return_value = ""
|
||||
|
||||
config_state = scm.GitConfigStateReal("/fake/path")
|
||||
config_state.load_config()
|
||||
|
||||
mock_capture.assert_called_once_with(
|
||||
['config', '--list', '-z', '--show-scope'],
|
||||
cwd=config_state.root,
|
||||
strip_out=False)
|
||||
|
||||
def test_construction_system(self):
|
||||
m, gs = self._make(
|
||||
global_state={'section.key': ['global']},
|
||||
|
||||
Reference in New Issue
Block a user