From: Aarni Koskela Date: Wed, 30 Dec 2015 14:39:48 +0000 (+0200) Subject: Add a test for header_comment updating. X-Git-Tag: 2.2.0~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F307%2Fhead;p=thirdparty%2Fbabel.git Add a test for header_comment updating. --- diff --git a/tests/messages/test_catalog.py b/tests/messages/test_catalog.py index 31bb1d14..7d18d80a 100644 --- a/tests/messages/test_catalog.py +++ b/tests/messages/test_catalog.py @@ -428,7 +428,7 @@ def test_catalog_add(): def test_catalog_update(): - template = catalog.Catalog() + template = catalog.Catalog(header_comment="# A Custom Header") template.add('green', locations=[('main.py', 99)]) template.add('blue', locations=[('main.py', 100)]) template.add(('salad', 'salads'), locations=[('util.py', 42)]) @@ -440,6 +440,7 @@ def test_catalog_update(): cat.update(template) assert len(cat) == 3 + assert cat.header_comment == template.header_comment # Header comment also gets updated msg1 = cat['green'] msg1.string