Test gbp.deb.control.Control

Function test_parse_control Parse a the control of debian package
Function test_no_control_error Raise an error if no control file exist or is empty
def test_parse_control():

Parse a the control of debian package

Methods tested:

Properties tested:

>>> import gbp.deb.control
>>> cl = gbp.deb.control.Control(cl_debian)
>>> cl.name
'git-buildpackage'
>>> cl.name == cl['Source']
True
>>> cl.section
'vcs'
>>> cl.section == cl['Section']
True
>>> cl.priority
'optional'
>>> cl.priority == cl['Priority']
True
>>> cl['Standards-Version']
'3.9.3'
>>> cl['Package']
def test_no_control_error():

Raise an error if no control file exist or is empty

Methods tested:

>>> import gbp.deb.control
>>> cl = gbp.deb.control.Control(filename="doesnotexist")
Traceback (most recent call last):
...
gbp.deb.control.NoControlError: Control file doesnotexist does not exist
>>> cl = gbp.deb.control.Control("notparsable")
Traceback (most recent call last):
...
gbp.deb.control.ParseControlError: Empty or invalid control file or contents
API Documentation for git-buildpackage, generated by pydoctor at 2018-08-19 08:52:02.