diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-05-31 10:20:36 +0300 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-07-27 13:45:51 +0200 |
commit | 7f9776f85055fd80549eb164aa8fffa4e0e5535f (patch) | |
tree | 5ab553459047fb6c3287461bd40007aaf5ac8887 /tests/test_GitRepository.py | |
parent | f4da9649c81a18c5c3aee0e5cedcf3bab85eb033 (diff) | |
download | git-buildpackage-7f9776f85055fd80549eb164aa8fffa4e0e5535f.tar.gz git-buildpackage-7f9776f85055fd80549eb164aa8fffa4e0e5535f.tar.bz2 git-buildpackage-7f9776f85055fd80549eb164aa8fffa4e0e5535f.zip |
GitRepository/get_commit_info: add author timestamp
Add author timestamps to the info returned by get_commit_info() method.
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests/test_GitRepository.py')
-rw-r--r-- | tests/test_GitRepository.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py index fe59cdfe..b91be61b 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -351,6 +351,7 @@ def test_get_commit_info(): - L{gbp.git.GitRepository.get_commit_info} >>> import gbp.git + >>> from datetime import datetime >>> repo = gbp.git.GitRepository(repo_dir) >>> info = repo.get_commit_info('HEAD') >>> info['id'] @@ -361,6 +362,9 @@ def test_get_commit_info(): 'foo' >>> '@' in info['author'].email True + >>> now = datetime.now() + >>> (now - datetime.fromtimestamp(int(info['author'].date.split()[0]))).seconds < 10 + True """ def test_mirror_clone(): |