diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-10-15 11:56:28 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-10-15 11:56:28 +0200 |
commit | 0f88fb96869b6ac3ed4dac7d23310a9327d3c89c (patch) | |
tree | 525b8e81cdc88898052e1703f09a4909db6f8044 /test/git/test_commit.py | |
parent | 741dfaadf732d4a2a897250c006d5ef3d3cd9f3a (diff) | |
download | gitpython-0f88fb96869b6ac3ed4dac7d23310a9327d3c89c.tar.gz |
Added test to verify the actor type can handle and parse unicode if it is passed in
test_odb: added more information to the message output
Diffstat (limited to 'test/git/test_commit.py')
-rw-r--r-- | test/git/test_commit.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/git/test_commit.py b/test/git/test_commit.py index 31ce2c4e..a9ea7f98 100644 --- a/test/git/test_commit.py +++ b/test/git/test_commit.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # test_commit.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # @@ -108,6 +109,14 @@ class TestCommit(TestBase): assert commit.committer_tz_offset == 14400, commit.committer_tz_offset assert commit.message == "initial project\n" + def test_unicode_actor(self): + # assure we can parse unicode actors correctly + name = "Üäöß ÄußÉ".decode("utf-8") + assert len(name) == 9 + special = Actor._from_string(u"%s <something@this.com>" % name) + assert special.name == name + assert isinstance(special.name, unicode) + def test_traversal(self): start = self.rorepo.commit("a4d06724202afccd2b5c54f81bcf2bf26dea7fff") first = self.rorepo.commit("33ebe7acec14b25c5f84f35a664803fcab2f7781") |