summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-02 04:36:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-02 04:36:35 +0000
commit914dc999ae3c95404d65de193b8674a5e74075d9 (patch)
treec9ab69faedeed06244aff4d8d42c67b1723a2a22 /tests
parentReleasing debian version 0.15.1-1. (diff)
downloadgita-914dc999ae3c95404d65de193b8674a5e74075d9.tar.xz
gita-914dc999ae3c95404d65de193b8674a5e74075d9.zip
Merging upstream version 0.15.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_main.py15
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()