Adding upstream version 0.15.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
f2586667ea
commit
d8a18b006a
4 changed files with 35 additions and 11 deletions
|
@ -287,7 +287,7 @@ def test_shell(mock_run, _, input):
|
|||
args = ['shell', 'repo7', input]
|
||||
__main__.main(args)
|
||||
expected_cmds = input
|
||||
mock_run.assert_called_once_with(expected_cmds, cwd='path7', check=True, shell=True, stderr=-2, stdout=-1)
|
||||
mock_run.assert_called_once_with(expected_cmds, cwd='path7', shell=True, stderr=-2, stdout=-1)
|
||||
|
||||
|
||||
class TestContext:
|
||||
|
@ -348,12 +348,25 @@ class TestGroupCmd:
|
|||
args = argparse.Namespace()
|
||||
args.to_group = None
|
||||
args.group_cmd = None
|
||||
args.to_show = None
|
||||
utils.get_groups.cache_clear()
|
||||
__main__.f_group(args)
|
||||
out, err = capfd.readouterr()
|
||||
assert err == ''
|
||||
assert 'xx: a b\nyy: a c d\n' == out
|
||||
|
||||
@patch('gita.common.get_config_fname', return_value=GROUP_FNAME)
|
||||
def test_ll_with_group(self, _, capfd):
|
||||
args = argparse.Namespace()
|
||||
args.to_group = None
|
||||
args.group_cmd = None
|
||||
args.to_show = 'yy'
|
||||
utils.get_groups.cache_clear()
|
||||
__main__.f_group(args)
|
||||
out, err = capfd.readouterr()
|
||||
assert err == ''
|
||||
assert 'a c d\n' == out
|
||||
|
||||
@patch('gita.common.get_config_fname', return_value=GROUP_FNAME)
|
||||
@patch('gita.utils.write_to_groups_file')
|
||||
def test_rename(self, mock_write, _):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue