module documentation

Function test_author Methods tested:
Function test_date Methods tested:
Function test_dict Test dict interface >>> import gbp.git >>> modifier = gbp.git.GitModifier('foo', 'bar', 1) >>> sorted(modifier.keys()) ['date', 'email', 'name'] >>> sorted(modifier.items()) [('date', '1 +0000'), ('email', 'bar'), ('name', 'foo')] >>> modifier...
def test_author():

Methods tested:

>>> import gbp.git
>>> modifier = gbp.git.GitModifier('foo', 'bar')
>>> modifier.name
'foo'
>>> modifier.email
'bar'
>>> modifier.get_author_env()['GIT_AUTHOR_EMAIL']
'bar'
>>> modifier.get_author_env()['GIT_AUTHOR_NAME']
'foo'
>>> modifier.get_committer_env()['GIT_COMMITTER_NAME']
'foo'
>>> modifier.get_committer_env()['GIT_COMMITTER_EMAIL']
'bar'
>>> modifier._get_env('foo')
Traceback (most recent call last):
...
gbp.git.modifier.GitModifierError: Neither committer nor author
>>> modifier['name']
'foo'
>>> modifier['email']
'bar'
>>> modifier['date']
def test_date():

Methods tested:

Properties tested:

>>> import gbp.git
>>> import datetime
>>> modifier = gbp.git.GitModifier('foo', 'bar', 1)
>>> modifier.date
'1 +0000'
>>> modifier.date = '1 +0400'
>>> modifier.date
'1 +0400'
>>> modifier['date']
'1 +0400'
>>> modifier.datetime   # doctest: +ELLIPSIS
datetime.datetime(1970, 1, 1, 4, 0, 1, tzinfo=<gbp.git.modifier.GitTz...>)
>>> modifier.date = datetime.datetime(1970, 1, 1, 0, 0, 1)
>>> modifier.date
'1 +0000'
>>> modifier.datetime   # doctest: +ELLIPSIS
datetime.datetime(1970, 1, 1, 0, 0, 1, tzinfo=<gbp.git.modifier.GitTz...>)
>>> modifier.tz_offset
'+0000'
def test_dict():

Test dict interface >>> import gbp.git >>> modifier = gbp.git.GitModifier('foo', 'bar', 1) >>> sorted(modifier.keys()) ['date', 'email', 'name'] >>> sorted(modifier.items()) [('date', '1 +0000'), ('email', 'bar'), ('name', 'foo')] >>> modifier.get('name') 'foo' >>> modifier.get('doesnotexist')