From 914dc999ae3c95404d65de193b8674a5e74075d9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 2 Aug 2021 06:36:18 +0200 Subject: Merging upstream version 0.15.2. Signed-off-by: Daniel Baumann --- tests/test_main.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_main.py b/tests/test_main.py index 490f5d2..d000e1a 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -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, _): -- cgit v1.2.3