From 9c4b870e75ec43120e43968462515790e646de10 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 3 May 2023 11:16:38 +0200 Subject: Merging upstream version 0.16.3. Signed-off-by: Daniel Baumann --- tests/test_main.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tests/test_main.py') diff --git a/tests/test_main.py b/tests/test_main.py index e36c2d8..0f2eeb5 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -94,14 +94,14 @@ class TestLsLl: out, err = capfd.readouterr() assert err == "" assert "gita" in out - assert info.Color.end in out + assert info.Color.end.value in out # no color on branch name __main__.main(["ll", "-C"]) out, err = capfd.readouterr() assert err == "" assert "gita" in out - assert info.Color.end not in out + assert info.Color.end.value not in out __main__.main(["ls", "gita"]) out, err = capfd.readouterr() @@ -367,8 +367,9 @@ class TestGroupCmd: assert err == "" assert "xx yy\n" == out + @patch("gita.utils.get_repos", return_value={"a": "", "b": "", "c": "", "d": ""}) @patch("gita.common.get_config_fname", return_value=GROUP_FNAME) - def test_ll(self, _, capfd): + def test_ll(self, _, __, capfd): args = argparse.Namespace() args.to_group = None args.group_cmd = None @@ -382,8 +383,9 @@ class TestGroupCmd: == "\x1b[4mxx\x1b[0m: \n - a\n - b\n\x1b[4myy\x1b[0m: \n - a\n - c\n - d\n" ) + @patch("gita.utils.get_repos", return_value={"a": "", "b": "", "c": "", "d": ""}) @patch("gita.common.get_config_fname", return_value=GROUP_FNAME) - def test_ll_with_group(self, _, capfd): + def test_ll_with_group(self, _, __, capfd): args = argparse.Namespace() args.to_group = None args.group_cmd = None @@ -394,9 +396,10 @@ class TestGroupCmd: assert err == "" assert "a c d\n" == out + @patch("gita.utils.get_repos", return_value={"a": "", "b": "", "c": "", "d": ""}) @patch("gita.common.get_config_fname", return_value=GROUP_FNAME) @patch("gita.utils.write_to_groups_file") - def test_rename(self, mock_write, _): + def test_rename(self, mock_write, *_): args = argparse.Namespace() args.gname = "xx" args.new_name = "zz" -- cgit v1.2.3