diff options
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r-- | tests/test_utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py index 9679116..acf9853 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -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)) |