diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-05-15 21:00:57 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-05-15 21:01:33 +0200 |
commit | 1eeb298934012223a50ced516c1a38592d30303e (patch) | |
tree | aa137ff36b5dd3a2dabe1215780bfd6422acffb3 /tests | |
parent | c57d4af675910ec151cf982532db0f877aef413f (diff) |
Add gbp.deb.ChangeLogSection
to parse package and version out of a changelog section
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_Changelog.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_Changelog.py b/tests/test_Changelog.py index 9048e205..48b370e7 100644 --- a/tests/test_Changelog.py +++ b/tests/test_Changelog.py @@ -192,3 +192,27 @@ def test_parse_last_mod(): >>> cl.date 'Mon, 17 Oct 2011 10:15:22 +0200' """ + +def test_parse_sections(): + """ + Test if we can parse sections out of the changelog + + Methods tested: + - L{gbp.deb.changelog.ChangeLog.__init__} + - L{gbp.deb.changelog.ChangeLogSection.__init__} + - L{gbp.deb.changelog.ChangeLogSection.parse} + + Properties tested: + - L{gbp.deb.changelog.ChangeLog.sections} + + >>> import gbp.deb.changelog + >>> cl = gbp.deb.changelog.ChangeLog(cl_debian) + >>> cl.sections[0].package + 'git-buildpackage' + >>> cl.sections[0].version + '0.5.32' + >>> cl.sections[1].package + 'git-buildpackage' + >>> cl.sections[1].version + '0.5.31' + """ |