Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

test parse_changelog

  • Loading branch information...
commit 382122ddf3e1eaf1d255bbe1fa967c71641de401 1 parent 49d5cb0
@mapleoin authored
Showing with 17 additions and 3 deletions.
  1. +0 −1  README.rst
  2. +3 −0  git_tarballs
  3. +14 −2 test_git_tarballs.py
View
1  README.rst
@@ -30,7 +30,6 @@ discover`` (on python2.7).
TODO
-* ignore Merge commits
* use current user's email address in .changes file
* stop parsing when we reach the last known commit
* tests
View
3  git_tarballs
@@ -92,6 +92,9 @@ def parse_changelog(changelog):
Returns an iterable of _sre.SRE_Match match objects from python's `re`
+ Each object will have the following attributes:
+ commit, author, date, message
+
"""
# FIXME: we can actually ignore Merge commits altogether.
return re.finditer(r'^commit (?P<commit>.*?)$'
View
16 test_git_tarballs.py
@@ -54,7 +54,14 @@
' doc/source/conf.py | 2 +\n'
' doc/source/man/nova-spicehtml5proxy.rst | 48 ++++++++++++++++\n'
' setup.py | 1 +\n'
- ' 4 files changed, 144 insertions(+)\n')
+ ' 4 files changed, 144 insertions(+)\n'
+ '\n'
+ 'commit bd8399bd2f51f1dcaa5194cb035415c634383917\n'
+ 'Merge: 2cdc27b e71e8c2\n'
+ 'Author: Jenkins <jenkins@review.openstack.org>\n'
+ 'Date: Thu Jan 17 11:59:12 2013 +0000\n'
+ '\n'
+ ' Merge "Pull NovaWebSocketProxy class out of nova-novncproxy binary"\n')
class TestGitTarballs(unittest.TestCase):
@@ -82,7 +89,12 @@ def test_parse_changelog(self):
('eab051ec68bdc8792dddb63c9231ece11ab06037',
'Foo Barwington <barwing@ton.com>',
'Thu Jan 3 10:23:50 2013 +0000',
- 'Add nova-spicehtml5proxy helper')],
+ 'Add nova-spicehtml5proxy helper'),
+ ('bd8399bd2f51f1dcaa5194cb035415c634383917',
+ 'Jenkins <jenkins@review.openstack.org>',
+ 'Thu Jan 17 11:59:12 2013 +0000',
+ 'Merge "Pull NovaWebSocketProxy class out of '
+ 'nova-novncproxy binary"')],
[c.groups() for c in ghb.parse_changelog(CHANGELOG)])
def test_parse_changelog_empty(self):
Please sign in to comment.
Something went wrong with that request. Please try again.