Module test_Changelog
[hide private]
[frames] | no frames]

Module test_Changelog

Test gbp.deb.changelog.ChangeLog

Functions [hide private]
 
test_parse_debian_only()
Parse a the changelog of debian only package
 
test_parse_no_eopch()
Parse a the changelog of a package without eopch
 
test_parse_eopch()
Parse a the changelog of a package without epoch
 
test_parse_name()
Methods tested:
 
test_parse_last_mod()
Test author, email and date of last modification
Variables [hide private]
  cl_debian = 'git-buildpackage (0.5.32) unstable; urgency=low\n...
  cl_upstream = 'python-dateutil (1.0-1) unstable; urgency=low\n...
  cl_epoch = 'xserver-xorg-video-nv (1:1.2.0-3) unstable; urgenc...
  __package__ = None
hash(x)
Function Details [hide private]

test_parse_debian_only()

 

Parse a the changelog of debian only package

Methods tested:

Properties tested:

>>> import gbp.deb.changelog
>>> cl = gbp.deb.changelog.ChangeLog(cl_debian)
>>> cl.version
'0.5.32'
>>> cl.version == cl['Version']
True
>>> cl.debian_version
'0.5.32'
>>> cl.debian_version == cl['Debian-Version']
True
>>> cl.noepoch
'0.5.32'
>>> cl.noepoch == cl['NoEpoch-Version']
True
>>> cl.epoch
>>> cl.upstream_version
>>> cl.is_native()
True

test_parse_no_eopch()

 

Parse a the changelog of a package without eopch

Methods tested:

Properties tested:

>>> import gbp.deb.changelog
>>> cl = gbp.deb.changelog.ChangeLog(cl_upstream)
>>> cl.version
'1.0-1'
>>> cl.version == cl['Version']
True
>>> cl.debian_version
'1'
>>> cl.debian_version == cl['Debian-Version']
True
>>> cl.noepoch
'1.0-1'
>>> cl.noepoch == cl['NoEpoch-Version']
True
>>> cl.epoch
>>> cl.upstream_version
'1.0'
>>> cl.has_epoch()
False
>>> cl.is_native()
False

test_parse_eopch()

 

Parse a the changelog of a package without epoch

Methods tested:

Properties tested:

>>> import gbp.deb.changelog
>>> cl = gbp.deb.changelog.ChangeLog(cl_epoch)
>>> cl.version
'1:1.2.0-3'
>>> cl.version == cl['Version']
True
>>> cl.debian_version
'3'
>>> cl.debian_version == cl['Debian-Version']
True
>>> cl.noepoch
'1.2.0-3'
>>> cl.noepoch == cl['NoEpoch-Version']
True
>>> cl.epoch
'1'
>>> cl.upstream_version
'1.2.0'
>>> cl.has_epoch()
True
>>> cl.is_native()
False

test_parse_name()

 

Methods tested:

Properties tested:

>>> import gbp.deb.changelog
>>> cl = gbp.deb.changelog.ChangeLog(cl_debian)
>>> cl.name
'git-buildpackage'

test_parse_last_mod()

 

Test author, email and date of last modification

Methods tested:

Properties tested:

>>> import gbp.deb.changelog
>>> cl = gbp.deb.changelog.ChangeLog(cl_debian)
>>> cl.author.startswith('Guido')
True
>>> cl.email
'agx@sigxcpu.org'
>>> cl.date
'Mon, 17 Oct 2011 10:15:22 +0200'

Variables Details [hide private]

cl_debian

Value:
'''git-buildpackage (0.5.32) unstable; urgency=low

  * [efe9220] Use known_compressions in guess_upstream_version too
    (Closes: #645477)
  * [e984baf] git-import-orig: fix --filter

 -- Guido G\xc3\xbcnther <agx@sigxcpu.org>  Mon, 17 Oct 2011 10:15:22 \
+0200
...

cl_upstream

Value:
'''python-dateutil (1.0-1) unstable; urgency=low

  * Initial release (Closes: #386256)

 -- Guido G\xc3\xbcnther <agx@sigxcpu.org>  Wed,  6 Sep 2006 10:33:06 \
+0200
'''

cl_epoch

Value:
'''xserver-xorg-video-nv (1:1.2.0-3) unstable; urgency=low

  [ Steve Langasek ]
  * Upload to unstable

 -- David Nusinow <dnusinow@debian.org>  Mon, 18 Sep 2006 19:57:45 -04\
00
'''