Skip to content

Commit dbdd36f

Browse files
committed
only compare certain Signature attributes
in an assertion
1 parent 4956dd5 commit dbdd36f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/test_refs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,10 @@ def test_set_target_with_message(testrepo: Repository) -> None:
595595
assert reference.raw_target == b'refs/heads/i18n'
596596
first = list(reference.log())[0]
597597
assert first.message == msg
598-
assert first.committer == sig
598+
# Signature.time and Signature.encoding may not be equal.
599+
# Here we only care that the name and email are correctly set.
600+
assert first.committer.name == sig.name
601+
assert first.committer.email == sig.email
599602

600603

601604
def test_delete(testrepo: Repository) -> None:

0 commit comments

Comments
 (0)