apidocs: links_stamp
epydoc -v -n git-buildpackage --no-sourcecode -o docs/apidocs/ \
- gbp*.py git*.py gbp/ tests/test_GitRepository.py
+ gbp*.py git*.py gbp/ tests/test_Git*.py
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
pychecker:
class GitModifier(object):
"""Stores authorship/comitter information"""
def __init__(self, name=None, email=None, date=None):
- self.__dict__.update(locals())
+ self.name = name
+ self.email = email
+ self.date = date
def _get_env(self, who):
"""Get author or comitter information as env var dictionary"""
--- /dev/null
+# vim: set fileencoding=utf-8 :
+
+"""
+Test L{gbp.git.GitModifier}
+"""
+
+def test_author():
+ """
+ Methods tested:
+ - L{gbp.git.GitModifer.get_author_env}
+ - L{gbp.git.GitModifer.get_comitter_env}
+
+ >>> import gbp.git
+ >>> modifier = gbp.git.GitModifier("foo", "bar")
+ >>> modifier.name
+ 'foo'
+ >>> modifier.email
+ 'bar'
+ >>> modifier.get_author_env()
+ {'GIT_AUTHOR_EMAIL': 'bar', 'GIT_AUTHOR_NAME': 'foo'}
+ >>> modifier.get_committer_env()
+ {'GIT_COMMITTER_NAME': 'foo', 'GIT_COMMITTER_EMAIL': 'bar'}
+ """