diff options
author | Rick Copeland <rcopeland@geek.net> | 2010-04-27 16:34:39 -0400 |
---|---|---|
committer | Rick Copeland <rcopeland@geek.net> | 2010-04-27 16:38:35 -0400 |
commit | b48e4d3aa853687f420dc51969837734b70bfdec (patch) | |
tree | 6d33df26dffe527e9a2c3835f8cae379b836a1f4 /test/git/test_commit.py | |
parent | 82b8902e033430000481eb355733cd7065342037 (diff) | |
download | gitpython-b48e4d3aa853687f420dc51969837734b70bfdec.tar.gz |
Add support for time zone information in tags and commits.
This commit includes
- an update to git.objects.utils:parse_actor_and_date to parse the timezone offset
- updates to the git.objects.Commit and git.objects.Tag objects to support *_tz_offset attributes
- updates to tests in test.git.test_commit and test.git.test_refs to check for appropriate *_tz_offset attributes
Diffstat (limited to 'test/git/test_commit.py')
-rw-r--r-- | test/git/test_commit.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/git/test_commit.py b/test/git/test_commit.py index 0a8470ec..e8bc078a 100644 --- a/test/git/test_commit.py +++ b/test/git/test_commit.py @@ -18,6 +18,7 @@ class TestCommit(TestBase): assert_equal("byronimo@gmail.com", commit.author.email) assert commit.author == commit.committer assert isinstance(commit.authored_date, int) and isinstance(commit.committed_date, int) + assert isinstance(commit.author_tz_offset, int) and isinstance(commit.committer_tz_offset, int) assert commit.message == "Added missing information to docstrings of commit and stats module" @@ -46,6 +47,8 @@ class TestCommit(TestBase): assert commit.committer == michael assert commit.authored_date == 1210193388 assert commit.committed_date == 1210193388 + assert commit.author_tz_offset == 14400, commit.author_tz_offset + assert commit.committer_tz_offset == 14400, commit.committer_tz_offset assert commit.message == "initial project" def test_traversal(self): |