1
+ #-*-coding:utf-8-*-
1
2
# test_index.py
2
3
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
3
4
#
@@ -433,7 +434,7 @@ def mixed_iterator():
433
434
# TEST COMMITTING
434
435
# commit changed index
435
436
cur_commit = cur_head .commit
436
- commit_message = "commit default head"
437
+ commit_message = u "commit default head by Frèderic Çaufl€ "
437
438
438
439
new_commit = index .commit (commit_message , head = False )
439
440
assert cur_commit != new_commit
@@ -449,18 +450,19 @@ def mixed_iterator():
449
450
# commit with other actor
450
451
cur_commit = cur_head .commit
451
452
452
- my_author = Actor ("An author " , "author@example.com" )
453
- my_committer = Actor ("An committer " , "committer@example.com" )
453
+ my_author = Actor (u"Frèderic Çaufl€ " , "author@example.com" )
454
+ my_committer = Actor (u"Committing Frèderic Çaufl€ " , "committer@example.com" )
454
455
commit_actor = index .commit (commit_message , author = my_author , committer = my_committer )
455
456
assert cur_commit != commit_actor
456
- assert commit_actor .author .name == "An author "
457
+ assert commit_actor .author .name == u"Frèderic Çaufl€ "
457
458
assert commit_actor .author .email == "author@example.com"
458
- assert commit_actor .committer .name == "An committer "
459
+ assert commit_actor .committer .name == u"Committing Frèderic Çaufl€ "
459
460
assert commit_actor .committer .email == "committer@example.com"
460
461
assert commit_actor .message == commit_message
461
462
assert commit_actor .parents [0 ] == cur_commit
462
463
assert len (new_commit .parents ) == 1
463
- assert cur_head .commit == cur_commit
464
+ assert cur_head .commit == commit_actor
465
+ assert cur_head .log ()[- 1 ].actor == my_committer
464
466
465
467
# same index, no parents
466
468
commit_message = "index without parents"
0 commit comments