1
0
Fork 0

Adding upstream version 0.16.4.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-11 18:49:40 +01:00
parent 7cdc86fc2c
commit 6e615d8555
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
11 changed files with 143 additions and 124 deletions

View file

@ -115,17 +115,17 @@ def test_auto_group(repos, paths, expected):
(
[{"abc": {"path": "/root/repo/", "type": "", "flags": []}}, False],
True,
"abc \x1b[31mrepo *+_ \x1b[0m msg xx",
"abc \x1b[31mrepo [*+?] \x1b[0m msg xx",
),
(
[{"abc": {"path": "/root/repo/", "type": "", "flags": []}}, True],
True,
"abc repo *+_ msg xx",
"abc repo [*+?] msg xx",
),
(
[{"repo": {"path": "/root/repo2/", "type": "", "flags": []}}, False],
False,
"repo \x1b[32mrepo _ \x1b[0m msg xx",
"repo \x1b[32mrepo [?] \x1b[0m msg xx",
),
],
)
@ -135,7 +135,7 @@ def test_describe(test_input, diff_return, expected, monkeypatch):
monkeypatch.setattr(info, "get_commit_msg", lambda *_: "msg")
monkeypatch.setattr(info, "get_commit_time", lambda *_: "xx")
monkeypatch.setattr(info, "has_untracked", lambda *_: True)
monkeypatch.setattr("os.chdir", lambda x: None)
monkeypatch.setattr(info, "get_common_commit", lambda x: "")
info.get_color_encoding.cache_clear() # avoid side effect
assert expected == next(utils.describe(*test_input))