Skip to content

Commit 3250313

Browse files
committed
Test that extra prefix "WARNING:" is omitted
This changes test_initial_refresh_from_bad_git_path_env_warn to assert a message with no added "WARNING:" prefix. As discussed in gitpython-developers#1815, the extra prefix is confusing with logging configured, showing "CRITICAL:git.cmd:WARNING: Bad git executable." instead of "CRITICAL:git.cmd: Bad git executable."
1 parent db36174 commit 3250313

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_git.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def test_initial_refresh_from_bad_git_path_env_warn(self, case):
363363
refresh()
364364
self.assertEqual(len(ctx.records), 1)
365365
message = ctx.records[0].getMessage()
366-
self.assertRegex(message, r"\AWARNING: Bad git executable.\n")
366+
self.assertRegex(message, r"\ABad git executable.\n")
367367
self.assertEqual(self.git.GIT_PYTHON_GIT_EXECUTABLE, "git")
368368

369369
@ddt.data(("2",), ("r",), ("raise",), ("e",), ("error",))

0 commit comments

Comments
 (0)