summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-02 04:36:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-02 04:36:14 +0000
commit8c81ee7a5681220d669c7c64d867fdddae38d8be (patch)
tree253c24415ea2dfaedd5ac0772638e5522ce9c4b6 /tests
parentAdding upstream version 0.15.1. (diff)
downloadgita-8c81ee7a5681220d669c7c64d867fdddae38d8be.tar.xz
gita-8c81ee7a5681220d669c7c64d867fdddae38d8be.zip
Adding upstream version 0.15.2.upstream/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()