From f6523c15af935066b813c385b3cd8ff010001c01 Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Fri, 24 Jun 2022 18:28:55 +0200 Subject: Add regression test for TagReference.create If you pass the "message" kwarg, it also translates it to an -m command line flag, and with both -m and --message, the message appears twice. I will fix this in the next commit. --- test/test_refs.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/test_refs.py b/test/test_refs.py index 605648b0..5bb83100 100644 --- a/test/test_refs.py +++ b/test/test_refs.py @@ -572,6 +572,23 @@ class TestRefs(TestBase): # END for each path + @with_rw_repo("0.1.6") + def test_tag_message(self, rw_repo): + tag_ref = TagReference.create(rw_repo, "test-message-1", message="test") + assert tag_ref.tag.message == "test" + + tag_ref = TagReference.create(rw_repo, "test-message-2", logmsg="test") + assert tag_ref.tag.message == "test" + + tag_ref = TagReference.create( + rw_repo, + "test-message-3", + # Logmsg should take precedence over "message". + message="test1", + logmsg="test2", + ) + assert tag_ref.tag.message == "test2" + def test_dereference_recursive(self): # for now, just test the HEAD assert SymbolicReference.dereference_recursive(self.rorepo, "HEAD") -- cgit v1.2.1