diff options
Diffstat (limited to '')
-rw-r--r-- | tests/test_main.py | 15 |
1 files changed, 14 insertions, 1 deletions
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,6 +348,7 @@ 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() @@ -355,6 +356,18 @@ class TestGroupCmd: 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, _): args = argparse.Namespace() |