diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-01-10 15:23:37 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-01-10 15:26:37 +0100 |
commit | 92f8799fe1e293b6f206721757c7c66f4ededfa6 (patch) | |
tree | f2adf87fc0053b0b8d35bb5613aec499f0c21e4b /tests | |
parent | 3335bfe1e8fe57945c0ce6ee7f89f144bf54d0ac (diff) |
gbp.deb.changelog: Allow to parse out changes from a specific version
We don't iterate over all individual sections but rather let
dpkg-parsechangelog do the hard work.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/doctests/test_Changelog.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/doctests/test_Changelog.py b/tests/doctests/test_Changelog.py index 9525e76d..cddf5ae7 100644 --- a/tests/doctests/test_Changelog.py +++ b/tests/doctests/test_Changelog.py @@ -223,6 +223,23 @@ def test_parse_sections(): """ +def test_get_changes(): + """ + Test if we can get changes + + Methods tested: + - L{gbp.deb.changelog.ChangeLog.__init__} + - L{gbp.deb.changelog.ChangeLog.get_changes} + + >>> import gbp.deb.changelog + >>> cl = gbp.deb.changelog.ChangeLog(cl_debian) + >>> len(cl.get_changes().split('\\n')) + 19 + >>> len(cl.get_changes('0.5.31').split('\\n')) + 7 + """ + + def test_add_section(): """ Test if we can add a section to an existing changelog |